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 <[email protected]>
Signed-off-by: Eric Van Hensbergen <[email protected]>
This commit is contained in:
Aneesh Kumar K.V 2010-08-30 16:04:35 +00:00 • committed by Eric Van Hensbergen
commit 3c30750ffa

View file

@ -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)