linux/fs/ocfs2/dlm
Joseph Qi 1e58958160 ocfs2/dlm: fix race between dispatched_work and dlm_lockres_grab_inflight_worker
Commit ac4fef4d23 ("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>
2014-12-18 19:08:11 -08:00
..
dlmapi.h ocfs2/trivial: Remove trailing whitespaces 2010-01-25 19:20:51 -08:00
dlmast.c ocfs2: use list_for_each_entry() instead of list_for_each() 2013-09-11 15:56:36 -07:00
dlmcommon.h ocfs2/dlm: do not purge lockres that is queued for assert master 2014-06-23 16:47:45 -07:00
dlmconvert.c ocfs2: use list_for_each_entry() instead of list_for_each() 2013-09-11 15:56:36 -07:00
dlmconvert.h
dlmdebug.c fs/ocfs2/dlm/dlmdebug.c: use seq_open_private() not seq_open() 2014-10-09 22:25:47 -04:00
dlmdebug.h ocfs2/dlm: Cleanup dlmdebug.c 2010-12-22 18:34:44 -08:00
dlmdomain.c ocfs2: remove unneeded NULL check 2014-12-10 17:41:04 -08:00
dlmdomain.h
dlmlock.c ocfs2: remove NULL assignments on static 2014-06-04 16:53:53 -07:00
dlmmaster.c ocfs2/dlm: fix race between dispatched_work and dlm_lockres_grab_inflight_worker 2014-12-18 19:08:11 -08:00
dlmrecovery.c ocfs2/dlm: let sender retry if dlm_dispatch_assert_master failed with -ENOMEM 2014-12-10 17:41:03 -08:00
dlmthread.c ocfs2/dlm: do not purge lockres that is queued for assert master 2014-06-23 16:47:45 -07:00
dlmunlock.c ocfs2: fix deadlock when two nodes are converting same lock from PR to EX and idletimeout closes conn 2014-06-23 16:47:45 -07:00
Makefile ocfs2: remove versioning information 2014-01-21 16:19:41 -08:00