We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dbac8fe commit 3bcde88Copy full SHA for 3bcde88
fs/bcachefs/super.c
@@ -1811,7 +1811,11 @@ int bch2_dev_add(struct bch_fs *c, const char *path)
1811
goto err_late;
1812
1813
up_write(&c->state_lock);
1814
- return 0;
+out:
1815
+ printbuf_exit(&label);
1816
+ printbuf_exit(&errbuf);
1817
+ bch_err_fn(c, ret);
1818
+ return ret;
1819
1820
err_unlock:
1821
mutex_unlock(&c->sb_lock);
@@ -1820,10 +1824,7 @@ int bch2_dev_add(struct bch_fs *c, const char *path)
1824
if (ca)
1825
bch2_dev_free(ca);
1822
1826
bch2_free_super(&sb);
1823
- printbuf_exit(&label);
- printbuf_exit(&errbuf);
- bch_err_fn(c, ret);
- return ret;
1827
+ goto out;
1828
err_late:
1829
1830
ca = NULL;
0 commit comments