]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/journal_reclaim.c
Update bcachefs sources to da7d42a9a2 bcachefs: Add new assertions for shutdown path
[bcachefs-tools-debian] / libbcachefs / journal_reclaim.c
index 72486f1f8a8e28fe6af9bede873e3a669ba912b6..8de83e10375187803730214e3bee4c3cd425256c 100644 (file)
@@ -845,10 +845,8 @@ int bch2_journal_flush_device_pins(struct journal *j, int dev_idx)
         * expects to find devices marked for journal data on unclean mount.
         */
        ret = bch2_journal_meta(&c->journal);
-       if (ret) {
-               mutex_unlock(&c->replicas_gc_lock);
-               return ret;
-       }
+       if (ret)
+               goto err;
 
        seq = 0;
        spin_lock(&j->lock);
@@ -867,7 +865,7 @@ int bch2_journal_flush_device_pins(struct journal *j, int dev_idx)
                spin_lock(&j->lock);
        }
        spin_unlock(&j->lock);
-
+err:
        ret = bch2_replicas_gc_end(c, ret);
        mutex_unlock(&c->replicas_gc_lock);