diff options
author | Yan, Zheng <zyan@redhat.com> | 2015-03-24 03:49:36 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2015-04-20 11:55:36 -0400 |
commit | a9f6eb61850e1599f9aa5141f25ccc1d8248e174 (patch) | |
tree | 85f679a07a520e47301c88f9fcd0ff52979658b5 /fs/ceph | |
parent | 571ade336ac89f5db602f7df992152e4f4b945bc (diff) |
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 <zyan@redhat.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/mds_client.c | 7 |
1 files changed, 0 insertions, 7 deletions
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, | |||
1120 | mdsc->num_cap_flushing--; | 1120 | mdsc->num_cap_flushing--; |
1121 | drop = 1; | 1121 | drop = 1; |
1122 | } | 1122 | } |
1123 | if (drop && ci->i_wrbuffer_ref) { | ||
1124 | pr_info(" dropping dirty data for %p %lld\n", | ||
1125 | inode, ceph_ino(inode)); | ||
1126 | ci->i_wrbuffer_ref = 0; | ||
1127 | ci->i_wrbuffer_ref_head = 0; | ||
1128 | drop++; | ||
1129 | } | ||
1130 | spin_unlock(&mdsc->cap_dirty_lock); | 1123 | spin_unlock(&mdsc->cap_dirty_lock); |
1131 | } | 1124 | } |
1132 | spin_unlock(&ci->i_ceph_lock); | 1125 | spin_unlock(&ci->i_ceph_lock); |