1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>vfs_unlink</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Filesystems API"><link rel="up" href="other_functions.html" title="Other Functions"><link rel="prev" href="API-lookup-one-len.html" title="lookup_one_len"><link rel="next" href="API-vfs-link.html" title="vfs_link"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">vfs_unlink</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-lookup-one-len.html">Prev</a> </td><th width="60%" align="center">Other Functions</th><td width="20%" align="right"> <a accesskey="n" href="API-vfs-link.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-vfs-unlink"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>vfs_unlink — 2 unlink a filesystem object 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">vfs_unlink </b>(</code></td><td>struct inode * <var class="pdparam">dir</var>, </td></tr><tr><td> </td><td>struct dentry * <var class="pdparam">dentry</var>, </td></tr><tr><td> </td><td>struct inode ** <var class="pdparam">delegated_inode</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1102208588"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>dir</code></em></span></dt><dd><p> 4 parent directory 5 </p></dd><dt><span class="term"><em class="parameter"><code>dentry</code></em></span></dt><dd><p> 6 victim 7 </p></dd><dt><span class="term"><em class="parameter"><code>delegated_inode</code></em></span></dt><dd><p> 8 returns victim inode, if the inode is delegated. 9 </p></dd></dl></div></div><div class="refsect1"><a name="idp1102212244"></a><h2>Description</h2><p> 10 The caller must hold dir->i_mutex. 11 </p><p> 12 13 If vfs_unlink discovers a delegation, it will return -EWOULDBLOCK and 14 return a reference to the inode in delegated_inode. The caller 15 should then break the delegation on that inode and retry. Because 16 breaking a delegation may take a long time, the caller should drop 17 dir->i_mutex before doing so. 18 </p><p> 19 20 Alternatively, a caller may pass NULL for delegated_inode. This may 21 be appropriate for callers that expect the underlying filesystem not 22 to be NFS exported. 23</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-lookup-one-len.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="other_functions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-vfs-link.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">lookup_one_len</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">vfs_link</span></td></tr></table></div></body></html> 24