diff options
author | Yan, Zheng <zyan@redhat.com> | 2016-05-20 03:41:20 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-06-01 04:30:41 -0400 |
commit | 1464975816c79a7cd28dc314384f060a122a9d55 (patch) | |
tree | 7226723f372d03c190e27389584716ecb0d988ee | |
parent | 368e35857dfab264f512d040c4486c9b13297988 (diff) |
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>
-rw-r--r-- | fs/ceph/caps.c | 9 |
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, | |||
2993 | if (fill_inline) | 2993 | if (fill_inline) |
2994 | ceph_fill_inline_data(inode, NULL, inline_data, inline_len); | 2994 | ceph_fill_inline_data(inode, NULL, inline_data, inline_len); |
2995 | 2995 | ||
2996 | if (queue_trunc) { | 2996 | if (queue_trunc) |
2997 | ceph_queue_vmtruncate(inode); | 2997 | ceph_queue_vmtruncate(inode); |
2998 | ceph_queue_revalidate(inode); | 2998 | else if (queue_revalidate) |
2999 | } else if (queue_revalidate) | ||
3000 | ceph_queue_revalidate(inode); | 2999 | ceph_queue_revalidate(inode); |
3001 | 3000 | ||
3002 | if (writeback) | 3001 | if (writeback) |
@@ -3199,10 +3198,8 @@ static void handle_cap_trunc(struct inode *inode, | |||
3199 | truncate_seq, truncate_size, size); | 3198 | truncate_seq, truncate_size, size); |
3200 | spin_unlock(&ci->i_ceph_lock); | 3199 | spin_unlock(&ci->i_ceph_lock); |
3201 | 3200 | ||
3202 | if (queue_trunc) { | 3201 | if (queue_trunc) |
3203 | ceph_queue_vmtruncate(inode); | 3202 | ceph_queue_vmtruncate(inode); |
3204 | ceph_fscache_invalidate(inode); | ||
3205 | } | ||
3206 | } | 3203 | } |
3207 | 3204 | ||
3208 | /* | 3205 | /* |