diff options
author | Yan, Zheng <zyan@redhat.com> | 2015-01-08 08:30:12 -0500 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2015-02-19 05:31:38 -0500 |
commit | d3383a8e37f802818cde4cb489bb0735db637cf0 (patch) | |
tree | d4c662fa1a495440c7e6f5e9c851e2562287f930 /fs/ceph/caps.c | |
parent | 73e39e4dba828fe1affefe6290456623319707bd (diff) |
ceph: avoid block operation when !TASK_RUNNING (ceph_mdsc_sync)
check_cap_flush() calls mutex_lock(), which may block. So we can't
use it as condition check function for wait_event();
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r-- | fs/ceph/caps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 8ed1192606d9..844b57cb52bd 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -1450,8 +1450,8 @@ static int __mark_caps_flushing(struct inode *inode, | |||
1450 | spin_lock(&mdsc->cap_dirty_lock); | 1450 | spin_lock(&mdsc->cap_dirty_lock); |
1451 | list_del_init(&ci->i_dirty_item); | 1451 | list_del_init(&ci->i_dirty_item); |
1452 | 1452 | ||
1453 | ci->i_cap_flush_seq = ++mdsc->cap_flush_seq; | ||
1454 | if (list_empty(&ci->i_flushing_item)) { | 1453 | if (list_empty(&ci->i_flushing_item)) { |
1454 | ci->i_cap_flush_seq = ++mdsc->cap_flush_seq; | ||
1455 | list_add_tail(&ci->i_flushing_item, &session->s_cap_flushing); | 1455 | list_add_tail(&ci->i_flushing_item, &session->s_cap_flushing); |
1456 | mdsc->num_cap_flushing++; | 1456 | mdsc->num_cap_flushing++; |
1457 | dout(" inode %p now flushing seq %lld\n", inode, | 1457 | dout(" inode %p now flushing seq %lld\n", inode, |