Commit 834ec3e1 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher

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: c9ebc4b7 ("gfs2: allow journal replay to hold sd_log_flush_lock")
Cc: stable@vger.kernel.org # v5.7+
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 82218943
...@@ -512,9 +512,11 @@ void gfs2_recover_func(struct work_struct *work) ...@@ -512,9 +512,11 @@ void gfs2_recover_func(struct work_struct *work)
error = foreach_descriptor(jd, head.lh_tail, error = foreach_descriptor(jd, head.lh_tail,
head.lh_blkno, pass); head.lh_blkno, pass);
lops_after_scan(jd, error, pass); lops_after_scan(jd, error, pass);
if (error) if (error) {
up_read(&sdp->sd_log_flush_lock);
goto fail_gunlock_thaw; goto fail_gunlock_thaw;
} }
}
recover_local_statfs(jd, &head); recover_local_statfs(jd, &head);
clean_journal(jd, &head); clean_journal(jd, &head);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment