summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2016-05-20 10:41:20 +0300
committerIlya Dryomov <idryomov@gmail.com>2016-06-01 11:30:41 +0300
commit1464975816c79a7cd28dc314384f060a122a9d55 (patch)
tree7226723f372d03c190e27389584716ecb0d988ee /fs
parent368e35857dfab264f512d040c4486c9b13297988 (diff)
downloadlinux-1464975816c79a7cd28dc314384f060a122a9d55.tar.xz
ceph: avoid unnecessary fscache invalidation/revlidation
ceph_fill_file_size() has already called ceph_fscache_invalidate() if it return true. Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/caps.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index c17b5d76d75e..7bdf7d59a36d 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -2993,10 +2993,9 @@ static void handle_cap_grant(struct ceph_mds_client *mdsc,
if (fill_inline)
ceph_fill_inline_data(inode, NULL, inline_data, inline_len);
- if (queue_trunc) {
+ if (queue_trunc)
ceph_queue_vmtruncate(inode);
- ceph_queue_revalidate(inode);
- } else if (queue_revalidate)
+ else if (queue_revalidate)
ceph_queue_revalidate(inode);
if (writeback)
@@ -3199,10 +3198,8 @@ static void handle_cap_trunc(struct inode *inode,
truncate_seq, truncate_size, size);
spin_unlock(&ci->i_ceph_lock);
- if (queue_trunc) {
+ if (queue_trunc)
ceph_queue_vmtruncate(inode);
- ceph_fscache_invalidate(inode);
- }
}
/*