Skip to content

Commit

Permalink
NFS: do_setlk(): don't flush caches when we have a delegation
Browse files Browse the repository at this point in the history
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jul 9, 2008
1 parent 0f38b87 commit b541838
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/nfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,8 @@ static int do_setlk(struct file *filp, int cmd, struct file_lock *fl)
* This makes locking act as a cache coherency point.
*/
nfs_sync_mapping(filp->f_mapping);
nfs_zap_caches(inode);
if (!nfs_have_delegation(inode, FMODE_READ))
nfs_zap_caches(inode);
out:
return status;
}
Expand Down

0 comments on commit b541838

Please sign in to comment.