]> git.baikalelectronics.ru Git - kernel.git/commit
clean_bdev_aliases: Prevent cleaning blocks that are not in block range
authorChandan Rajendra <chandan@linux.vnet.ibm.com>
Sun, 25 Dec 2016 13:31:03 +0000 (19:01 +0530)
committerJens Axboe <axboe@fb.com>
Mon, 2 Jan 2017 16:35:14 +0000 (09:35 -0700)
commit5a5859f9ec317e27fbf0a7df9b7d4718c2ac2fcc
tree1496fa58d4878969d6b1e78acbc73074a4b85618
parentea3dad3fc7d804d507918d826af21f2987744d96
clean_bdev_aliases: Prevent cleaning blocks that are not in block range

The first block to be cleaned may start at a non-zero page offset. In
such a scenario clean_bdev_aliases() will end up cleaning blocks that
do not fall in the range of blocks to be cleaned. This commit fixes the
issue by skipping blocks that do not fall in valid block range.

Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
fs/buffer.c