]> err.no Git - linux-2.6/commitdiff
NFS: do_setlk(): don't flush caches when we have a delegation
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 10 Jun 2008 22:31:02 +0000 (18:31 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 9 Jul 2008 16:08:50 +0000 (12:08 -0400)
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/file.c

index 7ac89a845a5eb454c109bd089b9a473be217c8e8..0213c21038fa0c1a1f5afc3b5c9ad1e4487bd9f9 100644 (file)
@@ -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;
 }