fs: dlm: handle -EBUSY first in lock arg validation
authorAlexander Aring <aahringo@redhat.com>
Mon, 15 Aug 2022 19:43:15 +0000 (15:43 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:16:55 +0000 (13:16 +0200)
commit1323c3eb5022498bfb36d64edabc12477688a2c9
treee4cc814e3e2fe68f51d105396986758929ac3611
parent0a177079947431cd8f47993e15a00df8ba19e617
fs: dlm: handle -EBUSY first in lock arg validation

commit 44637ca41d551d409a481117b07fa209b330fca9 upstream.

During lock arg validation, first check for -EBUSY cases, then for
-EINVAL cases. The -EINVAL checks look at lkb state variables
which are not stable when an lkb is busy and would cause an
-EBUSY result, e.g. lkb->lkb_grmode.

Cc: stable@vger.kernel.org
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/dlm/lock.c