summaryrefslogtreecommitdiff
path: root/fs/bcachefs/super.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2023-09-13 19:44:09 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:10:13 +0300
commit0198b2356b5d0343ce933f8387a74972be6a2b10 (patch)
tree51c857980a7fd8dd86d659275946f803391bd682 /fs/bcachefs/super.c
parent71933fb69b7c5fe5efd2119b645d4fde337a6f3f (diff)
downloadlinux-0198b2356b5d0343ce933f8387a74972be6a2b10.tar.xz
bcachefs: Remove a redundant and harmless bch2_free_super() call
Remove a redundant call to bch2_free_super(). This is harmless because bch2_free_super() has a memset() at its end. So a second call would only lead to from kfree(NULL). Remove the redundant call and only rely on the error handling path. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/super.c')
-rw-r--r--fs/bcachefs/super.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c
index 9f852a6dd76a..2990eed85adf 100644
--- a/fs/bcachefs/super.c
+++ b/fs/bcachefs/super.c
@@ -1605,7 +1605,6 @@ int bch2_dev_add(struct bch_fs *c, const char *path)
ca = __bch2_dev_alloc(c, &dev_mi);
if (!ca) {
- bch2_free_super(&sb);
ret = -ENOMEM;
goto err;
}