fs: dlm: handle -EBUSY first in unlock validation
authorAlexander Aring <aahringo@redhat.com>
Mon, 15 Aug 2022 19:43:16 +0000 (15:43 -0400)
committerDavid Teigland <teigland@redhat.com>
Tue, 23 Aug 2022 19:42:32 +0000 (14:42 -0500)
commit420ba3cd035a202757f0848b435d743590deee94
tree67cc539961fc8feca451bdc31847660c7956cd6e
parent44637ca41d551d409a481117b07fa209b330fca9
fs: dlm: handle -EBUSY first in unlock validation

This patch checks for -EBUSY conditions in dlm_unlock() before
checking for -EINVAL conditions (except for CANCEL and
FORCEUNLOCK calls where a busy condition is expected.)
There are no problems with the current ordering of checks,
but this makes dlm_unlock() consistent with dlm_lock(), and
may avoid future problems if other checks are added.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lock.c