Re: [PATCH] hugetlbfs: return negative error code for bad mount option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 13 Apr 2009 12:56:23 +0900
Akinobu Mita <akinobu.mita@xxxxxxxxx> wrote:

> This fixes the following BUG:
> 
> # mount -o size=MM -t hugetlbfs none /huge
> hugetlbfs: Bad value 'MM' for mount option 'size=MM'
> ------------[ cut here ]------------
> kernel BUG at fs/super.c:996!

I can't tell where this BUG (or WARN?) is happening unless I know
exactly which kernel version was tested.

I assume that it is BUG_ON(!mnt->mnt_sb); in vfs_kern_mount()?

> Also, remove unused #include <linux/quotaops.h>
> 
> Cc: William Irwin <wli@xxxxxxxxxxxxxx>
> Cc: stable@xxxxxxxxxx
> Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
> ---
> 
> diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
> index 23a3c76..153d968 100644
> --- a/fs/hugetlbfs/inode.c
> +++ b/fs/hugetlbfs/inode.c
> @@ -26,7 +26,6 @@
>  #include <linux/pagevec.h>
>  #include <linux/parser.h>
>  #include <linux/mman.h>
> -#include <linux/quotaops.h>
>  #include <linux/slab.h>
>  #include <linux/dnotify.h>
>  #include <linux/statfs.h>
> @@ -842,7 +841,7 @@ hugetlbfs_parse_options(char *options, struct hugetlbfs_config *pconfig)
>  bad_val:
>   	printk(KERN_ERR "hugetlbfs: Bad value '%s' for mount option '%s'\n",
>  	       args[0].from, p);
> - 	return 1;
> + 	return -EINVAL;
>  }
>  
>  static int

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux