From: Yan, Zheng Date: Tue, 24 Mar 2015 07:49:36 +0000 (+0800) Subject: ceph: don't zero i_wrbuffer_ref when reconnecting is denied X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a9f6eb61850e1599f9aa5141f25ccc1d8248e174;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ceph: don't zero i_wrbuffer_ref when reconnecting is denied remove_session_caps_cb() does not truncate dirty data in page cache, but zeros i_wrbuffer_ref/i_wrbuffer_ref_head. This will result negtive i_wrbuffer_ref/i_wrbuffer_ref_head Signed-off-by: Yan, Zheng --- diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 0cfc2d163549..c3bac611a097 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -1120,13 +1120,6 @@ static int remove_session_caps_cb(struct inode *inode, struct ceph_cap *cap, mdsc->num_cap_flushing--; drop = 1; } - if (drop && ci->i_wrbuffer_ref) { - pr_info(" dropping dirty data for %p %lld\n", - inode, ceph_ino(inode)); - ci->i_wrbuffer_ref = 0; - ci->i_wrbuffer_ref_head = 0; - drop++; - } spin_unlock(&mdsc->cap_dirty_lock); } spin_unlock(&ci->i_ceph_lock);