From: Trond Myklebust Date: Tue, 10 Jun 2008 22:31:02 +0000 (-0400) Subject: NFS: do_setlk(): don't flush caches when we have a delegation X-Git-Tag: v2.6.27-rc1~1052^2~1^2~57 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5418383ef13f70528281546d02c15edc03d8567;p=linux-2.6 NFS: do_setlk(): don't flush caches when we have a delegation Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 7ac89a845a..0213c21038 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) * 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; }