linux/fs/ocfs2/dlm
Joseph Qi 868086710b ocfs2/dlm: do not get resource spinlock if lockres is new
commit 5760a97c71 upstream.

There is a deadlock case which reported by Guozhonghua:
  https://oss.oracle.com/pipermail/ocfs2-devel/2014-September/010079.html

This case is caused by &res->spinlock and &dlm->master_lock
misordering in different threads.

It was introduced by commit 8d400b81cc ("ocfs2/dlm: Clean up refmap
helpers").  Since lockres is new, it doesn't not require the
&res->spinlock.  So remove it.

Fixes: 8d400b81cc ("ocfs2/dlm: Clean up refmap helpers")
Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
Reviewed-by: joyce.xue <xuejiufei@huawei.com>
Reported-by: Guozhonghua <guozhonghua@h3c.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-05 14:52:21 -07:00
..
Makefile ocfs2: remove versioning information 2014-01-21 16:19:41 -08:00
dlmapi.h
dlmast.c ocfs2: use list_for_each_entry() instead of list_for_each() 2013-09-11 15:56:36 -07:00
dlmcommon.h ocfs2: use list_for_each_entry() instead of list_for_each() 2013-09-11 15:56:36 -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 ocfs2: use list_for_each_entry() instead of list_for_each() 2013-09-11 15:56:36 -07:00
dlmdebug.h
dlmdomain.c ocfs2: remove versioning information 2014-01-21 16:19:41 -08:00
dlmdomain.h
dlmlock.c ocfs2: use list_for_each_entry() instead of list_for_each() 2013-09-11 15:56:36 -07:00
dlmmaster.c ocfs2/dlm: do not get resource spinlock if lockres is new 2014-10-05 14:52:21 -07:00
dlmrecovery.c ocfs2: dlm: fix recovery hung 2014-05-06 07:59:36 -07:00
dlmthread.c ocfs2: use list_for_each_entry() instead of list_for_each() 2013-09-11 15:56:36 -07:00
dlmunlock.c ocfs2: use list_for_each_entry() instead of list_for_each() 2013-09-11 15:56:36 -07:00