]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: Clean up function may_grant
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 9 Aug 2021 22:43:55 +0000 (00:43 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Wed, 20 Oct 2021 17:33:08 +0000 (19:33 +0200)
commit15cab4b9f28959c22e3b158bce34ee0b3479ff30
tree3484777082fadb7fd12622226fae8f8ca75a2644
parent6f247fd2e9b41cb8e99f96e49b5d83877b25d255
gfs2: Clean up function may_grant

Pass the first current glock holder into function may_grant and
deobfuscate the logic there.

While at it, switch from BUG_ON to GLOCK_BUG_ON in may_grant.  To make
that build cleanly, de-constify the may_grant arguments.

We're now using function find_first_holder in do_promote, so move the
function's definition above do_promote.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/glock.c