summaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_inode.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2010-08-30 18:04:35 +0200
committerEric Van Hensbergen <ericvh@gmail.com>2010-09-13 15:13:03 +0200
commit3c30750ffafbc32af040b09f777b67aa2486b063 (patch)
treedd1a5e2ba2ab5a044a75187bd0fc5d8d58213016 /fs/9p/vfs_inode.c
parent9p: Check for NULL fid in v9fs_dir_release() (diff)
downloadlinux-3c30750ffafbc32af040b09f777b67aa2486b063.tar.xz
linux-3c30750ffafbc32af040b09f777b67aa2486b063.zip
fs/9p: Use the correct dentry operations
We should use the cached dentry operation only if caching mode is enabled Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p/vfs_inode.c')
-rw-r--r--fs/9p/vfs_inode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 84159cf9c521..a6990bbf6056 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -730,7 +730,10 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int mode,
P9_DPRINTK(P9_DEBUG_VFS, "inode creation failed %d\n", err);
goto error;
}
- dentry->d_op = &v9fs_cached_dentry_operations;
+ if (v9ses->cache)
+ dentry->d_op = &v9fs_cached_dentry_operations;
+ else
+ dentry->d_op = &v9fs_dentry_operations;
d_instantiate(dentry, inode);
err = v9fs_fid_add(dentry, fid);
if (err < 0)