diff options
author | David Sterba <dsterba@suse.cz> | 2013-11-19 13:36:21 +0100 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-01-28 22:19:41 +0100 |
commit | cc37bb04201217b7acb11213e16cb5530c30da8f (patch) | |
tree | c27e7ecb38db667734de53619ebb00995d41521d /fs/btrfs/sysfs.c | |
parent | btrfs: reserve no transaction units in btrfs_feature_attr_store (diff) | |
download | linux-cc37bb04201217b7acb11213e16cb5530c30da8f.tar.xz linux-cc37bb04201217b7acb11213e16cb5530c30da8f.zip |
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: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/sysfs.c')
-rw-r--r-- | fs/btrfs/sysfs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index 8fdc0520e298..b535285642dc 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c @@ -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) |