DLM: fix conversion deadlock when DLM_LKF_NODLCKWT flag is set
authortsutomu.owa@toshiba.co.jp <tsutomu.owa@toshiba.co.jp>
Fri, 15 Sep 2017 19:17:23 +0000 (14:17 -0500)
committerDavid Teigland <teigland@redhat.com>
Mon, 25 Sep 2017 17:45:21 +0000 (12:45 -0500)
commit294e7e458763dc1d229cbbe7147a6034bfc6e39a
tree5b5d3cda6d51e5f5c8a4817b7f4446a2c181515f
parent173a31fe2b23b3ccc45d0b70edb225b1d836c31d
DLM: fix conversion deadlock when DLM_LKF_NODLCKWT flag is set

When the DLM_LKF_NODLCKWT flag was set, even if conversion deadlock
was detected, the caller of can_be_granted() was unknown.
We change the behavior of can_be_granted() and change it to detect
conversion deadlock regardless of whether the DLM_LKF_NODLCKWT flag
is set or not. And depending on whether the DLM_LKF_NODLCKWT flag
is set or not, we change the behavior at the caller of can_be_granted().

This fix has no effect except when using DLM_LKF_NODLCKWT flag.
Currently, ocfs2 uses the DLM_LKF_NODLCKWT flag and does not expect a
cancel operation from conversion deadlock when calling dlm_lock().
ocfs2 is implemented to perform a cancel operation by requesting
BASTs (callback).

Signed-off-by: Tadashi Miyauchi <miyauchi@toshiba-tops.co.jp>
Signed-off-by: Tsutomu Owa <tsutomu.owa@toshiba.co.jp>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lock.c