diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/hugetlbfs/inode.c | 8 | ||||
-rw-r--r-- | fs/super.c | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 711b801fbcdf..d145cb79c30a 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
@@ -621,6 +621,8 @@ hugetlbfs_parse_options(char *options, struct hugetlbfs_config *pconfig) | |||
621 | 621 | ||
622 | while ((p = strsep(&options, ",")) != NULL) { | 622 | while ((p = strsep(&options, ",")) != NULL) { |
623 | int token; | 623 | int token; |
624 | if (!*p) | ||
625 | continue; | ||
624 | 626 | ||
625 | token = match_token(p, tokens, args); | 627 | token = match_token(p, tokens, args); |
626 | switch (token) { | 628 | switch (token) { |
@@ -665,8 +667,9 @@ hugetlbfs_parse_options(char *options, struct hugetlbfs_config *pconfig) | |||
665 | break; | 667 | break; |
666 | 668 | ||
667 | default: | 669 | default: |
668 | printk(KERN_ERR "hugetlbfs: Bad mount option: %s\n", p); | 670 | printk(KERN_ERR "hugetlbfs: Bad mount option: \"%s\"\n", |
669 | return 1; | 671 | p); |
672 | return -EINVAL; | ||
670 | break; | 673 | break; |
671 | } | 674 | } |
672 | } | 675 | } |
@@ -693,7 +696,6 @@ hugetlbfs_fill_super(struct super_block *sb, void *data, int silent) | |||
693 | config.gid = current->fsgid; | 696 | config.gid = current->fsgid; |
694 | config.mode = 0755; | 697 | config.mode = 0755; |
695 | ret = hugetlbfs_parse_options(data, &config); | 698 | ret = hugetlbfs_parse_options(data, &config); |
696 | |||
697 | if (ret) | 699 | if (ret) |
698 | return ret; | 700 | return ret; |
699 | 701 | ||
diff --git a/fs/super.c b/fs/super.c index 5260d620c555..fc8ebedc6bed 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -884,6 +884,7 @@ vfs_kern_mount(struct file_system_type *type, int flags, const char *name, void | |||
884 | error = type->get_sb(type, flags, name, data, mnt); | 884 | error = type->get_sb(type, flags, name, data, mnt); |
885 | if (error < 0) | 885 | if (error < 0) |
886 | goto out_free_secdata; | 886 | goto out_free_secdata; |
887 | BUG_ON(!mnt->mnt_sb); | ||
887 | 888 | ||
888 | error = security_sb_kern_mount(mnt->mnt_sb, secdata); | 889 | error = security_sb_kern_mount(mnt->mnt_sb, secdata); |
889 | if (error) | 890 | if (error) |