summaryrefslogtreecommitdiffstats
path: root/drivers/lightnvm
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2017-10-13 09:36:06 -0600
committerJens Axboe <axboe@kernel.dk>2017-10-13 09:36:06 -0600
commitcdd094fd0ad750c94ccaa5b2ee84fd8264f6f433 (patch)
treeb0d5c08369ab73932761517639183e55ca2a85b3 /drivers/lightnvm
parent1a94b2d484677dc559c96251dd0e7c7b8811c378 (diff)
downloadlinux-cdd094fd0ad750c94ccaa5b2ee84fd8264f6f433.tar.bz2
Revert "lightnvm: prevent bd removal if busy"
Christoph correctly points out that this issue is no different for other block devices, and poking at cross layer internals is not the right way to solve it. This reverts commit bb6aa6f08268bbce4e0185b18cab9e04505d6695. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/lightnvm')
-rw-r--r--drivers/lightnvm/core.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
index fe21f4dd33e9..83249b43dd06 100644
--- a/drivers/lightnvm/core.c
+++ b/drivers/lightnvm/core.c
@@ -390,7 +390,6 @@ static void __nvm_remove_target(struct nvm_target *t)
static int nvm_remove_tgt(struct nvm_dev *dev, struct nvm_ioctl_remove *remove)
{
struct nvm_target *t;
- struct block_device *bdev;
mutex_lock(&dev->mlock);
t = nvm_find_target(dev, remove->tgtname);
@@ -398,19 +397,6 @@ static int nvm_remove_tgt(struct nvm_dev *dev, struct nvm_ioctl_remove *remove)
mutex_unlock(&dev->mlock);
return 1;
}
- bdev = bdget_disk(t->disk, 0);
- if (!bdev) {
- pr_err("nvm: removal failed, allocating bd failed\n");
- mutex_unlock(&dev->mlock);
- return -ENOMEM;
- }
- if (bdev->bd_super || bdev->bd_part_count) {
- pr_err("nvm: removal failed, block device busy\n");
- bdput(bdev);
- mutex_unlock(&dev->mlock);
- return -EBUSY;
- }
- bdput(bdev);
__nvm_remove_target(t);
mutex_unlock(&dev->mlock);