summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2018-07-03 13:34:22 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-29 13:40:14 +0100
commit5af2d106ca7b1777bbb4724521c6c130700ee7b8 (patch)
tree5f62fa9ce1640337dc178c8303349aa4b2d7eddb /tools
parentf5cecc055048208051cfd2db1793f923668f29b6 (diff)
block: fix infinite loop if the device loses discard capability
[ Upstream commit b88aef36b87c9787a4db724923ec4f57dfd513f3 ] If __blkdev_issue_discard is in progress and a device mapper device is reloaded with a table that doesn't support discard, q->limits.max_discard_sectors is set to zero. This results in infinite loop in __blkdev_issue_discard. This patch checks if max_discard_sectors is zero and aborts with -EOPNOTSUPP. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Tested-by: Zdenek Kabelac <mpatocka@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions