From: Bart Van Assche Date: Wed, 16 Oct 2013 12:20:25 +0000 (+0200) Subject: dlm: Avoid that dlm_release_lockspace() incorrectly returns -EBUSY X-Git-Tag: v3.13-rc1~108^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a97f4a66d8ee4faf0f31cc4ad3f4aa0baef23fc7;p=pandora-kernel.git dlm: Avoid that dlm_release_lockspace() incorrectly returns -EBUSY When dlm_release_lockspace(ls, 1) is invoked on a busy system immediately after the last dlm_unlock() AST has finished it can occur that lkb_idr_is_local() is invoked for the unlocked LKB since removal from ls_lkbidr only occurs after the AST has returned. If that happens dlm_release_lockspace(ls, 1) will return -EBUSY instead of releasing the lockspace. Fix this race condition by changing lkb_idr_is_local() such that it only returns true for LKB's that have not yet been unlocked. Signed-off-by: Bart Van Assche Signed-off-by: David Teigland --- Reading git-diff-tree failed