summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorSage Weil2009-11-07 07:19:16 +0100
committerChris Mason2009-12-17 18:33:36 +0100
commita7a3f7cadd9bdee569243f7ead9550aa16b60e07 (patch)
treec9ccc035bf08e6698e1cf56888f563393226d880 /fs/btrfs/super.c
parentBtrfs: don't add extent 0 to the free space cache v2 (diff)
downloadkernel-qcow2-linux-a7a3f7cadd9bdee569243f7ead9550aa16b60e07.tar.gz
kernel-qcow2-linux-a7a3f7cadd9bdee569243f7ead9550aa16b60e07.tar.xz
kernel-qcow2-linux-a7a3f7cadd9bdee569243f7ead9550aa16b60e07.zip
Btrfs: fail mount on bad mount options
We shouldn't silently ignore unrecognized options. Signed-off-by: Sage Weil <sage@newdream.net> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 270cc96b9a43..193d920e54eb 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -128,6 +128,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
substring_t args[MAX_OPT_ARGS];
char *p, *num;
int intarg;
+ int ret = 0;
if (!options)
return 0;
@@ -262,12 +263,18 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
case Opt_discard:
btrfs_set_opt(info->mount_opt, DISCARD);
break;
+ case Opt_err:
+ printk(KERN_INFO "btrfs: unrecognized mount option "
+ "'%s'\n", p);
+ ret = -EINVAL;
+ goto out;
default:
break;
}
}
+out:
kfree(options);
- return 0;
+ return ret;
}
/*