diff options
author | Kent Overstreet <kmo@daterainc.com> | 2014-07-08 00:03:36 +0400 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2014-08-05 02:23:04 +0400 |
commit | 0781c8748cf1ea2b0dcd966571103909528c4efa (patch) | |
tree | 850eab5da7032aa0c02467de3141b9c593fd0b42 /drivers/md/bcache/super.c | |
parent | 789d21dbd9d8889e62c79ec19585fcc97e42ef07 (diff) | |
download | linux-0781c8748cf1ea2b0dcd966571103909528c4efa.tar.xz |
bcache: Drop unneeded blk_sync_queue() calls
this is needed for the queue/block device we created (it's done by
blk_cleanup_queue() which we do call) - but calling it for the block devices we
only opened is pointless.
Change-Id: I53dfded14ed15b9581d10ca8399d5e1b3abbf9f2
Diffstat (limited to 'drivers/md/bcache/super.c')
-rw-r--r-- | drivers/md/bcache/super.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 60e75130a44c..d4713d098a39 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1084,12 +1084,8 @@ static void cached_dev_free(struct closure *cl) mutex_unlock(&bch_register_lock); - if (!IS_ERR_OR_NULL(dc->bdev)) { - if (dc->bdev->bd_disk) - blk_sync_queue(bdev_get_queue(dc->bdev)); - + if (!IS_ERR_OR_NULL(dc->bdev)) blkdev_put(dc->bdev, FMODE_READ|FMODE_WRITE|FMODE_EXCL); - } wake_up(&unregister_wait); @@ -1817,10 +1813,8 @@ void bch_cache_release(struct kobject *kobj) if (ca->sb_bio.bi_inline_vecs[0].bv_page) put_page(ca->sb_bio.bi_io_vec[0].bv_page); - if (!IS_ERR_OR_NULL(ca->bdev)) { - blk_sync_queue(bdev_get_queue(ca->bdev)); + if (!IS_ERR_OR_NULL(ca->bdev)) blkdev_put(ca->bdev, FMODE_READ|FMODE_WRITE|FMODE_EXCL); - } kfree(ca); module_put(THIS_MODULE); |