mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 14:41:27 +00:00
fs/9p: Clarify cached dentry delete operation
Update the comment to indicate that we don't want to cache negative dentries. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
This commit is contained in:
parent
7263cebed9
commit
a950a65264
1 changed files with 4 additions and 9 deletions
|
@ -63,20 +63,15 @@ static int v9fs_dentry_delete(const struct dentry *dentry)
|
||||||
* v9fs_cached_dentry_delete - called when dentry refcount equals 0
|
* v9fs_cached_dentry_delete - called when dentry refcount equals 0
|
||||||
* @dentry: dentry in question
|
* @dentry: dentry in question
|
||||||
*
|
*
|
||||||
* Only return 1 if our inode is invalid. Only non-synthetic files
|
|
||||||
* (ones without mtime == 0) should be calling this function.
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int v9fs_cached_dentry_delete(const struct dentry *dentry)
|
static int v9fs_cached_dentry_delete(const struct dentry *dentry)
|
||||||
{
|
{
|
||||||
struct inode *inode = dentry->d_inode;
|
P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n",
|
||||||
P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name,
|
dentry->d_name.name, dentry);
|
||||||
dentry);
|
|
||||||
|
|
||||||
if(!inode)
|
/* Don't cache negative dentries */
|
||||||
|
if (!dentry->d_inode)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue