]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
gfs2: Clean up function may_grant
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 14 Apr 2022 22:28:43 +0000 (06:28 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 22 Jun 2022 12:22:31 +0000 (14:22 +0200)
commitab84c40d7226dfb6468ddf15a39f2fb06e531e3c
treeb2584e3420a0279cd6265787576c9633f2e4d3a4
parent7e0c2f2083f882e52cb983eee238853e153e0bdd
gfs2: Clean up function may_grant

BugLink: https://bugs.launchpad.net/bugs/1976135
commit 6144464937fe1e6135b13a30502a339d549bf093 upstream

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>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/gfs2/glock.c