diff options
author | Joseph Qi <joseph.qi@huawei.com> | 2014-12-18 16:17:34 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-18 19:08:11 -0800 |
commit | 1e5895816030eaadb952c89eb9f4054e5c0082c3 (patch) | |
tree | 00476a915aed960c74bef81f8541cc88eb2899e8 /fs/open.c | |
parent | f62f12b3a426c8f65b10011b1ec40ba4277cbf5f (diff) | |
download | op-kernel-dev-1e5895816030eaadb952c89eb9f4054e5c0082c3.zip op-kernel-dev-1e5895816030eaadb952c89eb9f4054e5c0082c3.tar.gz |
ocfs2/dlm: fix race between dispatched_work and dlm_lockres_grab_inflight_worker
Commit ac4fef4d23ed ("ocfs2/dlm: do not purge lockres that is queued for
assert master") may have the following possible race case:
dlm_dispatch_assert_master dlm_wq
========================================================================
queue_work(dlm->quedlm_worker,
&dlm->dispatched_work);
dispatch work,
dlm_lockres_drop_inflight_worker
*BUG_ON(res->inflight_assert_workers == 0)*
dlm_lockres_grab_inflight_worker
inflight_assert_workers++
So ensure inflight_assert_workers to be increased first.
Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
Signed-off-by: Xue jiufei <xuejiufei@huawei.com>
Cc: Joel Becker <jlbec@evilplan.org>
Reviewed-by: Mark Fasheh <mfasheh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/open.c')
0 files changed, 0 insertions, 0 deletions