Btrfs: add sanity checks regarding to parsing mount options
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>
Wed, 24 Jul 2013 02:29:05 +0000 (10:29 +0800)
committerChris Mason <chris.mason@fusionio.com>
Sun, 1 Sep 2013 12:04:28 +0000 (08:04 -0400)
I just notice the following commands succeed:
mount <dev> <mnt> -o thread_pool=-1

This is ridiculous, only positive thread_pool makes sense,this
patch adds sanity checks for them, and also catches the error of
ENOMEM if allocating memory fails.

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Reviewed-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/super.c

Simple merge