aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/file.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-06-10 18:31:02 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-07-09 12:08:50 -0400
commitb5418383ef13f70528281546d02c15edc03d8567 (patch)
treea25d5e9c78c14af25a71046541eaa9f77819d9a9 /fs/nfs/file.c
parent0f38b873aeaae698c3693748438547c8493165fb (diff)
NFS: do_setlk(): don't flush caches when we have a delegation
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r--fs/nfs/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 7ac89a845a5e..0213c21038fa 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -602,7 +602,8 @@ static int do_setlk(struct file *filp, int cmd, struct file_lock *fl)
602 * This makes locking act as a cache coherency point. 602 * This makes locking act as a cache coherency point.
603 */ 603 */
604 nfs_sync_mapping(filp->f_mapping); 604 nfs_sync_mapping(filp->f_mapping);
605 nfs_zap_caches(inode); 605 if (!nfs_have_delegation(inode, FMODE_READ))
606 nfs_zap_caches(inode);
606out: 607out:
607 return status; 608 return status;
608} 609}