hugetlbfs: return negative error code for bad mount option
authorAkinobu Mita <akinobu.mita@gmail.com>
Tue, 21 Apr 2009 21:20:04 +0000 (21:20 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 2 May 2009 17:24:36 +0000 (10:24 -0700)
commit5ed78f96792993e20ff1434c63232d1764cfc7f6
tree395593b291172f3dec9aa3a7f8d2365b4a0c75e6
parent28adca7b3ca1cfd63b01e1a8da30a234282aa05c
hugetlbfs: return negative error code for bad mount option

upstream commit: c12ddba09394c60e1120e6997794fa6ed52da884

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!

Due to

BUG_ON(!mnt->mnt_sb);

in vfs_kern_mount().

Also, remove unused #include <linux/quotaops.h>

Cc: William Irwin <wli@holomorphy.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/hugetlbfs/inode.c