gfs2: introduce qd_bh_get_or_undo
authorBob Peterson <rpeterso@redhat.com>
Fri, 23 Jun 2023 13:07:55 +0000 (08:07 -0500)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 5 Sep 2023 13:58:18 +0000 (15:58 +0200)
commit7dbc6ae60dd7089d8ed42892b6a66c138f0aa7a0
tree2e3f2fc69128b5e94541ed804366c947f9b2d016
parent3932e5073011567d24ce66cf66575d4d81ea8c94
gfs2: introduce qd_bh_get_or_undo

This patch is an attempt to force some consistency in quota sync
processing. Two functions (qd_fish and gfs2_quota_unlock) called
qd_check_sync, after which they both called bh_get, and if that failed,
they took the same steps to undo the actions of qd_check_sync.

This patch introduces a new function, qd_bh_get_or_undo, which performs
the same steps, reducing code redundancy.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/quota.c