Skip to content

Commit 54f67de

Browse files
committed
Revert "btrfs: reject unknown mount options early"
This reverts commit 5f52149. The patch breaks mounts with security mount options like $ mount -o context=system_u:object_r:root_t:s0 /dev/sdX /mn mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sdX, missing codepage or helper program, ... We cannot reject all unknown options in btrfs_parse_subvol_options() as intended, the security options can be present at this point and it's not possible to enumerate them in a future proof way. This means unknown mount options are silently accepted like before when the filesystem is mounted with either -o subvol=/path or as followup mounts of the same device. Reported-by: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com Signed-off-by: David Sterba <dsterba@suse.com>
1 parent e36f949 commit 54f67de

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

fs/btrfs/super.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -954,10 +954,6 @@ static int btrfs_parse_subvol_options(const char *options, char **subvol_name,
954954

955955
*subvol_objectid = subvolid;
956956
break;
957-
case Opt_err:
958-
btrfs_err(NULL, "unrecognized mount option '%s'", p);
959-
error = -EINVAL;
960-
goto out;
961957
default:
962958
break;
963959
}

0 commit comments

Comments
 (0)