Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc37bb04 authored by David Sterba's avatar David Sterba Committed by Chris Mason
Browse files

btrfs: replace BUG in can_modify_feature



We don't need to crash hard here, it's just reading a sysfs file. The
values considered in switch are from a fixed set, the default case
should not happen at all.

Signed-off-by: default avatarDavid Sterba <dsterba@suse.cz>
Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 43d87fa2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -75,7 +75,9 @@ static int can_modify_feature(struct btrfs_feature_attr *fa)
		clear = BTRFS_FEATURE_INCOMPAT_SAFE_CLEAR;
		break;
	default:
		BUG();
		printk(KERN_WARNING "btrfs: sysfs: unknown feature set %d\n",
				fa->feature_set);
		return 0;
	}

	if (set & fa->feature_bit)