]> git.baikalelectronics.ru Git - kernel.git/commit
block: restore a specific error code in bdev_del_partition
authorChristoph Hellwig <hch@lst.de>
Tue, 8 Sep 2020 14:15:06 +0000 (16:15 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 8 Sep 2020 14:18:24 +0000 (08:18 -0600)
commit41c56efbc54a3afcf2962d7687695c21678beeb8
treee5403a98c02f4342d19a1350750f81eeba6d36e6
parent0858ef1dde5042c8051db2c62b47ae3017a6cdc6
block: restore a specific error code in bdev_del_partition

mdadm relies on the fact that deleting an invalid partition returns
-ENXIO or -ENOTTY to detect if a block device is a partition or a
whole device.

Fixes: f8723c31d400 ("block: fix locking in bdev_del_partition")
Reported-by: kernel test robot <rong.a.chen@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/partitions/core.c