summaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_dentry.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-02-28 12:33:58 +0100
committerEric Van Hensbergen <ericvh@gmail.com>2011-03-15 15:57:38 +0100
commita950a65264ab9e9b96e7093e3358ffa84799f99c (patch)
treebd59e82918b316eee4a999c3184ced748f04460e /fs/9p/vfs_dentry.c
parentfs/9p: Add buffered write support for v9fs. (diff)
downloadlinux-a950a65264ab9e9b96e7093e3358ffa84799f99c.tar.xz
linux-a950a65264ab9e9b96e7093e3358ffa84799f99c.zip
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>
Diffstat (limited to 'fs/9p/vfs_dentry.c')
-rw-r--r--fs/9p/vfs_dentry.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/9p/vfs_dentry.c b/fs/9p/vfs_dentry.c
index 233b7d4ffe5e..a4ae4be5ab59 100644
--- a/fs/9p/vfs_dentry.c
+++ b/fs/9p/vfs_dentry.c
@@ -63,20 +63,15 @@ static int v9fs_dentry_delete(const struct dentry *dentry)
* v9fs_cached_dentry_delete - called when dentry refcount equals 0
* @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)
{
- struct inode *inode = dentry->d_inode;
- P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name,
- dentry);
+ P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n",
+ dentry->d_name.name, dentry);
- if(!inode)
+ /* Don't cache negative dentries */
+ if (!dentry->d_inode)
return 1;
-
return 0;
}