]> git.baikalelectronics.ru Git - kernel.git/commit
brd: Fix discard request processing
authorBart Van Assche <bart.vanassche@sandisk.com>
Tue, 15 Dec 2015 15:38:22 +0000 (16:38 +0100)
committerJens Axboe <axboe@fb.com>
Tue, 15 Mar 2016 21:10:29 +0000 (14:10 -0700)
commit30f667466622ee0cb4a90477711813e68b9f5dd5
tree6b837a6a666337c8129b8d836a7ae48b50a9fc5d
parentf3e223acc2deba3bbda9b9adc4d68537fb99069f
brd: Fix discard request processing

Avoid that discard requests with size => PAGE_SIZE fail with
-EIO. Refuse discard requests if the discard size is not a
multiple of the page size.

Fixes: cccb0842a28c ("brd: Refuse improperly aligned discard requests")
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Jan Kara <jack@suse.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Robert Elliot <elliott@hp.com>
Cc: stable <stable@vger.kernel.org> # v4.4+
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/brd.c