]> git.baikalelectronics.ru Git - kernel.git/commit
block: Invalidate cache on discard v2
authorDmitry Monakhov <dmonakhov@openvz.org>
Wed, 25 Oct 2017 00:44:57 +0000 (18:44 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 25 Oct 2017 00:44:57 +0000 (18:44 -0600)
commit83718eeabf8901c2135d35fa210e77b07b8ffb1e
treef4ae426a9204fe49711a0d79f57d825fc7063706
parentff03a03a6c1f0b1791d2aeef249415a64200176f
block: Invalidate cache on discard v2

It is reasonable drop page cache on discard, otherwise that pages may
be written by writeback second later, so thin provision devices will
not be happy. This seems to be a  security leak in case of secure discard case.

Also add check for queue_discard flag on early stage.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/ioctl.c