hugetlbfs: return negative error code for bad mount option
authorAkinobu Mita <akinobu.mita@gmail.com>
Tue, 21 Apr 2009 19:24:05 +0000 (12:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 21 Apr 2009 20:41:48 +0000 (13:41 -0700)
commitc12ddba09394c60e1120e6997794fa6ed52da884
tree7848a312993bee19c0096b2e4cb08b15140fd08c
parent4dec302ff71ebf48f5784a2d2fc5e3745e6d4d52
hugetlbfs: return negative error code for bad mount option

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>
Cc: <stable@kernel.org>
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>
fs/hugetlbfs/inode.c