summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2016-05-19 14:15:19 +0300
committerIlya Dryomov <idryomov@gmail.com>2016-05-26 02:15:42 +0300
commite536030934aebf049fe6aaebc58dd37aeee21840 (patch)
treecb8fa121673316816cfbfde5f0e0bc101ce5850d /fs
parent9abd4db713704aac146395e079224ddd716e9b95 (diff)
downloadlinux-e536030934aebf049fe6aaebc58dd37aeee21840.tar.xz
ceph: fix wake_up_session_cb()
We should reset i_requested_max_size before waking the waiters. (zero i_requested_max_size make waiter re-request the max size) Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/mds_client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 7ad31283d510..2103b823bec0 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -1258,13 +1258,13 @@ static int wake_up_session_cb(struct inode *inode, struct ceph_cap *cap,
{
struct ceph_inode_info *ci = ceph_inode(inode);
- wake_up_all(&ci->i_cap_wq);
if (arg) {
spin_lock(&ci->i_ceph_lock);
ci->i_wanted_max_size = 0;
ci->i_requested_max_size = 0;
spin_unlock(&ci->i_ceph_lock);
}
+ wake_up_all(&ci->i_cap_wq);
return 0;
}