Skip to contentSkip to conversation

fs/9p: Use the correct dentry operations

PATCH New Aneesh Kumar K.V 1 participant 1 message Aug 30, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/9p: Use the correct dentry operations

We should use the cached dentry operation only if caching mode is enabled

---
 fs/9p/vfs_inode.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
fs/9p/vfs_inode.c +4 -1
index d5c4867..5acee50 100644
@@ -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)
Signature · 1 line
1.7.0.4