aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-05-08 22:49:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-05-08 22:49:35 -0400
commit1daac193f21d6e3d0adc528a06a7e11522d4254d (patch)
tree4034f896bc92bc3568c0e9bc1cd1df0af884d625 /drivers/block
parent41c64bb19c740b5433f768032ecaf05375c955ee (diff)
parent0ff28d9f4674d781e492bcff6f32f0fe48cf0fed (diff)
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe: "A collection of fixes since the merge window; - fix for a double elevator module release, from Chao Yu. Ancient bug. - the splice() MORE flag fix from Christophe Leroy. - a fix for NVMe, fixing a patch that went in in the merge window. From Keith. - two fixes for blk-mq CPU hotplug handling, from Ming Lei. - bdi vs blockdev lifetime fix from Neil Brown, fixing and oops in md. - two blk-mq fixes from Shaohua, fixing a race on queue stop and a bad merge issue with FUA writes. - division-by-zero fix for writeback from Tejun. - a block bounce page accounting fix, making sure we inc/dec after bouncing so that pre/post IO pages match up. From Wang YanQing" * 'for-linus' of git://git.kernel.dk/linux-block: splice: sendfile() at once fails for big files blk-mq: don't lose requests if a stopped queue restarts blk-mq: fix FUA request hang block: destroy bdi before blockdev is unregistered. block:bounce: fix call inc_|dec_zone_page_state on different pages confuse value of NR_BOUNCE elevator: fix double release of elevator module writeback: use |1 instead of +1 to protect against div by zero blk-mq: fix CPU hotplug handling blk-mq: fix race between timeout and CPU hotplug NVMe: Fix VPD B0 max sectors translation
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/loop.c2
-rw-r--r--drivers/block/nvme-scsi.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index ae3fcb4199e9..d7173cb1ea76 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1620,8 +1620,8 @@ out:
1620 1620
1621static void loop_remove(struct loop_device *lo) 1621static void loop_remove(struct loop_device *lo)
1622{ 1622{
1623 del_gendisk(lo->lo_disk);
1624 blk_cleanup_queue(lo->lo_queue); 1623 blk_cleanup_queue(lo->lo_queue);
1624 del_gendisk(lo->lo_disk);
1625 blk_mq_free_tag_set(&lo->tag_set); 1625 blk_mq_free_tag_set(&lo->tag_set);
1626 put_disk(lo->lo_disk); 1626 put_disk(lo->lo_disk);
1627 kfree(lo); 1627 kfree(lo);
diff --git a/drivers/block/nvme-scsi.c b/drivers/block/nvme-scsi.c
index 6b736b00f63e..88f13c525712 100644
--- a/drivers/block/nvme-scsi.c
+++ b/drivers/block/nvme-scsi.c
@@ -944,7 +944,8 @@ static int nvme_trans_ext_inq_page(struct nvme_ns *ns, struct sg_io_hdr *hdr,
944static int nvme_trans_bdev_limits_page(struct nvme_ns *ns, struct sg_io_hdr *hdr, 944static int nvme_trans_bdev_limits_page(struct nvme_ns *ns, struct sg_io_hdr *hdr,
945 u8 *inq_response, int alloc_len) 945 u8 *inq_response, int alloc_len)
946{ 946{
947 __be32 max_sectors = cpu_to_be32(queue_max_hw_sectors(ns->queue)); 947 __be32 max_sectors = cpu_to_be32(
948 nvme_block_nr(ns, queue_max_hw_sectors(ns->queue)));
948 __be32 max_discard = cpu_to_be32(ns->queue->limits.max_discard_sectors); 949 __be32 max_discard = cpu_to_be32(ns->queue->limits.max_discard_sectors);
949 __be32 discard_desc_count = cpu_to_be32(0x100); 950 __be32 discard_desc_count = cpu_to_be32(0x100);
950 951