Commit b5418383 authored by Trond Myklebust's avatar Trond Myklebust

NFS: do_setlk(): don't flush caches when we have a delegation

Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 0f38b873
...@@ -602,6 +602,7 @@ static int do_setlk(struct file *filp, int cmd, struct file_lock *fl) ...@@ -602,6 +602,7 @@ static int do_setlk(struct file *filp, int cmd, struct file_lock *fl)
* This makes locking act as a cache coherency point. * This makes locking act as a cache coherency point.
*/ */
nfs_sync_mapping(filp->f_mapping); nfs_sync_mapping(filp->f_mapping);
if (!nfs_have_delegation(inode, FMODE_READ))
nfs_zap_caches(inode); nfs_zap_caches(inode);
out: out:
return status; return status;
......
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