Commit 3c30750ffafbc32af040b09f777b67aa2486b063

Authored by Aneesh Kumar K.V
Committed by Eric Van Hensbergen
1 parent 62726a7ab3

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>

Showing 1 changed file with 4 additions and 1 deletions Side-by-side Diff

... ... @@ -730,7 +730,10 @@
730 730 P9_DPRINTK(P9_DEBUG_VFS, "inode creation failed %d\n", err);
731 731 goto error;
732 732 }
733   - dentry->d_op = &v9fs_cached_dentry_operations;
  733 + if (v9ses->cache)
  734 + dentry->d_op = &v9fs_cached_dentry_operations;
  735 + else
  736 + dentry->d_op = &v9fs_dentry_operations;
734 737 d_instantiate(dentry, inode);
735 738 err = v9fs_fid_add(dentry, fid);
736 739 if (err < 0)