]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: fix bio_size_ok() for max_sectors > 0xffff
authorAkinobu Mita <akinobu.mita@gmail.com>
Mon, 18 Nov 2013 13:13:18 +0000 (22:13 +0900)
committerChris Mason <chris.mason@fusionio.com>
Thu, 21 Nov 2013 01:48:44 +0000 (20:48 -0500)
commite66af2e5a5136d2dfb15a5cfbd9ecbbb2861146a
treef7e0f94e4def76598b66861e9a9820b9ab86517d
parentc884d62c9b5dfbf62a5c9242575fccff3141529a
btrfs: fix bio_size_ok() for max_sectors > 0xffff

The data type of max_sectors in queue settings is unsigned int.  But
this value is stored to the local variable whose type is unsigned short
in bio_size_ok().  This can cause unexpected result when max_sectors >
0xffff.

Cc: Chris Mason <chris.mason@fusionio.com>
Cc: linux-btrfs@vger.kernel.org
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/volumes.c