Commit 14649758 authored by Yan, Zheng's avatar Yan, Zheng Committed by Ilya Dryomov

ceph: avoid unnecessary fscache invalidation/revlidation

ceph_fill_file_size() has already called ceph_fscache_invalidate()
if it return true.
Signed-off-by: default avatarYan, Zheng <zyan@redhat.com>
parent 368e3585
...@@ -2993,10 +2993,9 @@ static void handle_cap_grant(struct ceph_mds_client *mdsc, ...@@ -2993,10 +2993,9 @@ static void handle_cap_grant(struct ceph_mds_client *mdsc,
if (fill_inline) if (fill_inline)
ceph_fill_inline_data(inode, NULL, inline_data, inline_len); ceph_fill_inline_data(inode, NULL, inline_data, inline_len);
if (queue_trunc) { if (queue_trunc)
ceph_queue_vmtruncate(inode); ceph_queue_vmtruncate(inode);
ceph_queue_revalidate(inode); else if (queue_revalidate)
} else if (queue_revalidate)
ceph_queue_revalidate(inode); ceph_queue_revalidate(inode);
if (writeback) if (writeback)
...@@ -3199,10 +3198,8 @@ static void handle_cap_trunc(struct inode *inode, ...@@ -3199,10 +3198,8 @@ static void handle_cap_trunc(struct inode *inode,
truncate_seq, truncate_size, size); truncate_seq, truncate_size, size);
spin_unlock(&ci->i_ceph_lock); spin_unlock(&ci->i_ceph_lock);
if (queue_trunc) { if (queue_trunc)
ceph_queue_vmtruncate(inode); ceph_queue_vmtruncate(inode);
ceph_fscache_invalidate(inode);
}
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment