Commit edd73cf544849c10e0fbc294ca2171f6c28b4093
Committed by
Eric Van Hensbergen
1 parent
e959b54901
fs/9p: Add drop_inode 9p callback
We want to immediately drop the inode in non cached mode Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Showing 1 changed file with 15 additions and 0 deletions Side-by-side Diff
fs/9p/vfs_super.c
... | ... | @@ -293,6 +293,20 @@ |
293 | 293 | return p9_client_sync_fs(v9ses->root_fid); |
294 | 294 | } |
295 | 295 | |
296 | +static int v9fs_drop_inode(struct inode *inode) | |
297 | +{ | |
298 | + struct v9fs_session_info *v9ses; | |
299 | + v9ses = v9fs_inode2v9ses(inode); | |
300 | + if (v9ses->cache) | |
301 | + return generic_drop_inode(inode); | |
302 | + /* | |
303 | + * in case of non cached mode always drop the | |
304 | + * the inode because we want the inode attribute | |
305 | + * to always match that on the server. | |
306 | + */ | |
307 | + return 1; | |
308 | +} | |
309 | + | |
296 | 310 | static const struct super_operations v9fs_super_ops = { |
297 | 311 | .alloc_inode = v9fs_alloc_inode, |
298 | 312 | .destroy_inode = v9fs_destroy_inode, |
... | ... | @@ -307,6 +321,7 @@ |
307 | 321 | .destroy_inode = v9fs_destroy_inode, |
308 | 322 | .sync_fs = v9fs_sync_fs, |
309 | 323 | .statfs = v9fs_statfs, |
324 | + .drop_inode = v9fs_drop_inode, | |
310 | 325 | .evict_inode = v9fs_evict_inode, |
311 | 326 | .show_options = generic_show_options, |
312 | 327 | .umount_begin = v9fs_umount_begin, |