]> git.baikalelectronics.ru Git - kernel.git/commit
block: remove the bd_openers checks in blk_drop_partitions
authorChristoph Hellwig <hch@lst.de>
Tue, 28 Apr 2020 08:52:03 +0000 (10:52 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 30 Apr 2020 16:25:43 +0000 (10:25 -0600)
commit45703ec20f31f750a8ccea17404accc1f8c8dce3
tree6a0a7bb8aa945be7c521cbc1c93053ca9706b550
parent4ebfb69c6e389fa2dc55dafb393fd3a698ce3a63
block: remove the bd_openers checks in blk_drop_partitions

When replacing the bd_super check with a bd_openers I followed a logical
conclusion, which turns out to be utterly wrong.  When a block device has
bd_super sets it has a mount file system on it (although not every
mounted file system sets bd_super), but that also implies it doesn't even
have partitions to start with.

So instead of trying to come up with a logical check for all openers,
just remove the check entirely.

Fixes: 141bffa70f02 ("block: fix busy device checking in blk_drop_partitions")
Fixes: e84c52a91a99 ("block: fix busy device checking in blk_drop_partitions again")
Reported-by: Michal Koutný <mkoutny@suse.com>
Reported-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/partitions/core.c