aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2021-02-05 18:11:28 +0100
committerAndreas Gruenbacher <agruenba@redhat.com>2021-02-05 18:18:57 +0100
commit834ec3e1ee65029029225a86c12337a6cd385af7 (patch)
tree4f0ade04a6186dcb2056fb1c35c7b5d3ceb1e6c5 /fs/gfs2
parentgfs2: keep bios separate for each journal (diff)
downloadlinux-dev-834ec3e1ee65029029225a86c12337a6cd385af7.tar.xz
linux-dev-834ec3e1ee65029029225a86c12337a6cd385af7.zip
gfs2: Lock imbalance on error path in gfs2_recover_one
In gfs2_recover_one, fix a sd_log_flush_lock imbalance when a recovery pass fails. Fixes: c9ebc4b73799 ("gfs2: allow journal replay to hold sd_log_flush_lock") Cc: stable@vger.kernel.org # v5.7+ Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/recovery.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c
index cff8b9a6612c..282173774005 100644
--- a/fs/gfs2/recovery.c
+++ b/fs/gfs2/recovery.c
@@ -512,8 +512,10 @@ void gfs2_recover_func(struct work_struct *work)
error = foreach_descriptor(jd, head.lh_tail,
head.lh_blkno, pass);
lops_after_scan(jd, error, pass);
- if (error)
+ if (error) {
+ up_read(&sdp->sd_log_flush_lock);
goto fail_gunlock_thaw;
+ }
}
recover_local_statfs(jd, &head);