diff options
-rw-r--r-- | fs/btrfs/super.c | 9 |
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) | |||
128 | substring_t args[MAX_OPT_ARGS]; | 128 | substring_t args[MAX_OPT_ARGS]; |
129 | char *p, *num; | 129 | char *p, *num; |
130 | int intarg; | 130 | int intarg; |
131 | int ret = 0; | ||
131 | 132 | ||
132 | if (!options) | 133 | if (!options) |
133 | return 0; | 134 | return 0; |
@@ -262,12 +263,18 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) | |||
262 | case Opt_discard: | 263 | case Opt_discard: |
263 | btrfs_set_opt(info->mount_opt, DISCARD); | 264 | btrfs_set_opt(info->mount_opt, DISCARD); |
264 | break; | 265 | break; |
266 | case Opt_err: | ||
267 | printk(KERN_INFO "btrfs: unrecognized mount option " | ||
268 | "'%s'\n", p); | ||
269 | ret = -EINVAL; | ||
270 | goto out; | ||
265 | default: | 271 | default: |
266 | break; | 272 | break; |
267 | } | 273 | } |
268 | } | 274 | } |
275 | out: | ||
269 | kfree(options); | 276 | kfree(options); |
270 | return 0; | 277 | return ret; |
271 | } | 278 | } |
272 | 279 | ||
273 | /* | 280 | /* |