diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-06-11 00:31:02 +0200 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-07-09 18:08:50 +0200 |
commit | b5418383ef13f70528281546d02c15edc03d8567 (patch) | |
tree | a25d5e9c78c14af25a71046541eaa9f77819d9a9 /fs | |
parent | SUNRPC: Use GFP_NOFS when allocating credentials (diff) | |
download | linux-b5418383ef13f70528281546d02c15edc03d8567.tar.xz linux-b5418383ef13f70528281546d02c15edc03d8567.zip |
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')
-rw-r--r-- | fs/nfs/file.c | 3 |
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) * 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; } |