Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-linus-20191101' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:

- Two small nvme fixes, one is a fabrics connection fix, the other one
a cleanup made possible by that fix (Anton, via Keith)

- Fix requeue handling in umb ubd (Anton)

- Fix spin_lock_irq() nesting in blk-iocost (Dan)

- Three small io_uring fixes:
- Install io_uring fd after done with ctx (me)
- Clear ->result before every poll issue (me)
- Fix leak of shadow request on error (Pavel)

* tag 'for-linus-20191101' of git://git.kernel.dk/linux-block:
iocost: don't nest spin_lock_irq in ioc_weight_write()
io_uring: ensure we clear io_kiocb->result before each issue
um-ubd: Entrust re-queue to the upper layers
nvme-multipath: remove unused groups_only mode in ana log
nvme-multipath: fix possible io hang after ctrl reconnect
io_uring: don't touch ctx in setup after ring fd install
io_uring: Fix leaked shadow_req

+22 -13
+6 -2
arch/um/drivers/ubd_kern.c
··· 1403 1403 1404 1404 spin_unlock_irq(&ubd_dev->lock); 1405 1405 1406 - if (ret < 0) 1407 - blk_mq_requeue_request(req, true); 1406 + if (ret < 0) { 1407 + if (ret == -ENOMEM) 1408 + res = BLK_STS_RESOURCE; 1409 + else 1410 + res = BLK_STS_DEV_RESOURCE; 1411 + } 1408 1412 1409 1413 return res; 1410 1414 }
+2 -2
block/blk-iocost.c
··· 2110 2110 goto einval; 2111 2111 } 2112 2112 2113 - spin_lock_irq(&iocg->ioc->lock); 2113 + spin_lock(&iocg->ioc->lock); 2114 2114 iocg->cfg_weight = v; 2115 2115 weight_updated(iocg); 2116 - spin_unlock_irq(&iocg->ioc->lock); 2116 + spin_unlock(&iocg->ioc->lock); 2117 2117 2118 2118 blkg_conf_finish(&ctx); 2119 2119 return nbytes;
+4 -5
drivers/nvme/host/multipath.c
··· 522 522 return 0; 523 523 } 524 524 525 - static int nvme_read_ana_log(struct nvme_ctrl *ctrl, bool groups_only) 525 + static int nvme_read_ana_log(struct nvme_ctrl *ctrl) 526 526 { 527 527 u32 nr_change_groups = 0; 528 528 int error; 529 529 530 530 mutex_lock(&ctrl->ana_lock); 531 - error = nvme_get_log(ctrl, NVME_NSID_ALL, NVME_LOG_ANA, 532 - groups_only ? NVME_ANA_LOG_RGO : 0, 531 + error = nvme_get_log(ctrl, NVME_NSID_ALL, NVME_LOG_ANA, 0, 533 532 ctrl->ana_log_buf, ctrl->ana_log_size, 0); 534 533 if (error) { 535 534 dev_warn(ctrl->device, "Failed to get ANA log: %d\n", error); ··· 564 565 { 565 566 struct nvme_ctrl *ctrl = container_of(work, struct nvme_ctrl, ana_work); 566 567 567 - nvme_read_ana_log(ctrl, false); 568 + nvme_read_ana_log(ctrl); 568 569 } 569 570 570 571 static void nvme_anatt_timeout(struct timer_list *t) ··· 714 715 goto out; 715 716 } 716 717 717 - error = nvme_read_ana_log(ctrl, true); 718 + error = nvme_read_ana_log(ctrl); 718 719 if (error) 719 720 goto out_free_ana_log_buf; 720 721 return 0;
+10 -4
fs/io_uring.c
··· 1124 1124 1125 1125 kiocb->ki_flags |= IOCB_HIPRI; 1126 1126 kiocb->ki_complete = io_complete_rw_iopoll; 1127 + req->result = 0; 1127 1128 } else { 1128 1129 if (kiocb->ki_flags & IOCB_HIPRI) 1129 1130 return -EINVAL; ··· 2414 2413 if (ret) { 2415 2414 if (ret != -EIOCBQUEUED) { 2416 2415 io_free_req(req); 2416 + __io_free_req(shadow); 2417 2417 io_cqring_add_event(ctx, s->sqe->user_data, ret); 2418 2418 return 0; 2419 2419 } ··· 3830 3828 if (ret) 3831 3829 goto err; 3832 3830 3833 - ret = io_uring_get_fd(ctx); 3834 - if (ret < 0) 3835 - goto err; 3836 - 3837 3831 memset(&p->sq_off, 0, sizeof(p->sq_off)); 3838 3832 p->sq_off.head = offsetof(struct io_rings, sq.head); 3839 3833 p->sq_off.tail = offsetof(struct io_rings, sq.tail); ··· 3846 3848 p->cq_off.ring_entries = offsetof(struct io_rings, cq_ring_entries); 3847 3849 p->cq_off.overflow = offsetof(struct io_rings, cq_overflow); 3848 3850 p->cq_off.cqes = offsetof(struct io_rings, cqes); 3851 + 3852 + /* 3853 + * Install ring fd as the very last thing, so we don't risk someone 3854 + * having closed it before we finish setup 3855 + */ 3856 + ret = io_uring_get_fd(ctx); 3857 + if (ret < 0) 3858 + goto err; 3849 3859 3850 3860 p->features = IORING_FEAT_SINGLE_MMAP; 3851 3861 return ret;