]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita1b3d3a2d896a6d7d3f635370dc10b55a17e4acb
tree42f7ab57507b523ef3adb9a553a4612efa069673
parent45d3916be4ddef9fdc077709fcf9d2c8e5edca91
Btrfs: add sanity checks regarding to parsing mount options

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