Skip to contentSkip to conversation

btrfs: fix btrfs_parse_param() build failure

PATCH In review Arnd Bergmann 2 participants 2 messages Nov 29, 2023 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs: fix btrfs_parse_param() build failure

From: Arnd Bergmann <[email protected]>

With CONFIG_BTRFS_FS_POSIX_ACL disabled, the newly added function fails to build because of an apparent broken rebase:

fs/btrfs/super.c: In function 'btrfs_parse_param':
fs/btrfs/super.c:416:25: error: 'ret' undeclared (first use in this function); did you mean 'net'?

  416 |                         ret = -EINVAL;
      |                         ^~~

Just return the error directly here instead of the incorrect unwinding.

Fixes a7293bf27082 ("btrfs: add parse_param callback for the new mount api")
---
 fs/btrfs/super.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/btrfs/super.c +1 -2
index 59fe4ffce6e7..022179a05d76 100644
@@ -413,8 +413,7 @@ static int btrfs_parse_param(struct fs_context *fc,
 			fc->sb_flags |= SB_POSIXACL;
 #else
 			btrfs_err(NULL, "support for ACL not compiled in!");
-			ret = -EINVAL;
-			goto out;
+			return -EINVAL;
 #endif
 		}
 		/*
Signature · 1 line
2.39.2
#1 lore raw
Quoted 7 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

With CONFIG_BTRFS_FS_POSIX_ACL disabled, the newly added function fails to build because of an apparent broken rebase:

fs/btrfs/super.c: In function 'btrfs_parse_param':
fs/btrfs/super.c:416:25: error: 'ret' undeclared (first use in this function); did you mean 'net'?

Quoted 8 lines
  416 |                         ret = -EINVAL;
      |                         ^~~

Just return the error directly here instead of the incorrect unwinding.

Fixes a7293bf27082 ("btrfs: add parse_param callback for the new mount api")

Should be fixed in today's for-next snapshot, thanks.