From: Aneesh Kumar K.V Date: Mon, 28 Feb 2011 11:33:58 +0000 (+0530) Subject: fs/9p: Clarify cached dentry delete operation X-Git-Tag: v2.6.39-rc1~489^2~24 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=a950a65264ab9e9b96e7093e3358ffa84799f99c;p=~shefty%2Frdma-dev.git 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 Signed-off-by: Venkateswararao Jujjuri Signed-off-by: Eric Van Hensbergen --- diff --git a/fs/9p/vfs_dentry.c b/fs/9p/vfs_dentry.c index 233b7d4ffe5..a4ae4be5ab5 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; }