dm: Fix dm_accept_partial_bio() relative to zone management commands
authorDamien Le Moal <damien.lemoal@wdc.com>
Tue, 25 May 2021 21:24:54 +0000 (06:24 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jul 2021 07:44:46 +0000 (09:44 +0200)
commitcc4f0a9d5aa1b5abffb2366a0b37c37806362fe8
treeb6e1a34ee24aafac2e792d036ff5bd42deec5c9f
parent939f750215b89d2cc774a85a6810286aec0f5718
dm: Fix dm_accept_partial_bio() relative to zone management commands

[ Upstream commit 6842d264aa5205da338b6dcc6acfa2a6732558f1 ]

Fix dm_accept_partial_bio() to actually check that zone management
commands are not passed as explained in the function documentation
comment. Also, since a zone append operation cannot be split, add
REQ_OP_ZONE_APPEND as a forbidden command.

White lines are added around the group of BUG_ON() calls to make the
code more legible.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/dm.c