Commit bec273b4 authored by Trond Myklebust's avatar Trond Myklebust

NFS: Allow files that are open for write to invalidate caches

Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 16c32b71
......@@ -1057,15 +1057,11 @@ int nfs_open(struct inode *inode, struct file *filp)
ctx->mode = filp->f_mode;
nfs_file_set_open_context(filp, ctx);
put_nfs_open_context(ctx);
if ((filp->f_mode & FMODE_WRITE) != 0)
nfs_begin_data_update(inode);
return 0;
}
int nfs_release(struct inode *inode, struct file *filp)
{
if ((filp->f_mode & FMODE_WRITE) != 0)
nfs_end_data_update(inode);
nfs_file_clear_open_context(filp);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment