diff options
author | Yan, Zheng <zyan@redhat.com> | 2015-01-08 21:30:12 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2015-02-19 13:31:38 +0300 |
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, spin_lock(&mdsc->cap_dirty_lock); list_del_init(&ci->i_dirty_item); - ci->i_cap_flush_seq = ++mdsc->cap_flush_seq; if (list_empty(&ci->i_flushing_item)) { + ci->i_cap_flush_seq = ++mdsc->cap_flush_seq; list_add_tail(&ci->i_flushing_item, &session->s_cap_flushing); mdsc->num_cap_flushing++; dout(" inode %p now flushing seq %lld\n", inode, |