mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 15:03:52 +08:00
Merge tag 'block-6.16-20250718' of git://git.kernel.dk/linux
Pull block fixes from Jens Axboe:
- NVMe changes via Christoph:
- revert the cross-controller atomic write size validation
that caused regressions (Christoph Hellwig)
- fix endianness of command word printout in
nvme_log_err_passthru() (John Garry)
- fix callback lock for TLS handshake (Maurizio Lombardi)
- fix misaccounting of nvme-mpath inflight I/O (Yu Kuai)
- fix inconsistent RCU list manipulation in
nvme_ns_add_to_ctrl_list() (Zheng Qixing)
- Fix for a kobject leak in queue unregistration
- Fix for loop async file write start/end handling
* tag 'block-6.16-20250718' of git://git.kernel.dk/linux:
loop: use kiocb helpers to fix lockdep warning
nvmet-tcp: fix callback lock for TLS handshake
nvme: fix misaccounting of nvme-mpath inflight I/O
nvme: revert the cross-controller atomic write size validation
nvme: fix endianness of command word prints in nvme_log_err_passthru()
nvme: fix inconsistent RCU list manipulation in nvme_ns_add_to_ctrl_list()
block: fix kobject leak in blk_unregister_queue
This commit is contained in:
@@ -960,4 +960,5 @@ void blk_unregister_queue(struct gendisk *disk)
|
||||
elevator_set_none(q);
|
||||
|
||||
blk_debugfs_remove(disk);
|
||||
kobject_put(&disk->queue_kobj);
|
||||
}
|
||||
|
||||
@@ -308,14 +308,13 @@ end_io:
|
||||
static void lo_rw_aio_do_completion(struct loop_cmd *cmd)
|
||||
{
|
||||
struct request *rq = blk_mq_rq_from_pdu(cmd);
|
||||
struct loop_device *lo = rq->q->queuedata;
|
||||
|
||||
if (!atomic_dec_and_test(&cmd->ref))
|
||||
return;
|
||||
kfree(cmd->bvec);
|
||||
cmd->bvec = NULL;
|
||||
if (req_op(rq) == REQ_OP_WRITE)
|
||||
file_end_write(lo->lo_backing_file);
|
||||
kiocb_end_write(&cmd->iocb);
|
||||
if (likely(!blk_should_fake_timeout(rq->q)))
|
||||
blk_mq_complete_request(rq);
|
||||
}
|
||||
@@ -391,7 +390,7 @@ static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd,
|
||||
}
|
||||
|
||||
if (rw == ITER_SOURCE) {
|
||||
file_start_write(lo->lo_backing_file);
|
||||
kiocb_start_write(&cmd->iocb);
|
||||
ret = file->f_op->write_iter(&cmd->iocb, &iter);
|
||||
} else
|
||||
ret = file->f_op->read_iter(&cmd->iocb, &iter);
|
||||
|
||||
@@ -381,12 +381,12 @@ static void nvme_log_err_passthru(struct request *req)
|
||||
nr->status & NVME_SC_MASK, /* Status Code */
|
||||
nr->status & NVME_STATUS_MORE ? "MORE " : "",
|
||||
nr->status & NVME_STATUS_DNR ? "DNR " : "",
|
||||
nr->cmd->common.cdw10,
|
||||
nr->cmd->common.cdw11,
|
||||
nr->cmd->common.cdw12,
|
||||
nr->cmd->common.cdw13,
|
||||
nr->cmd->common.cdw14,
|
||||
nr->cmd->common.cdw15);
|
||||
le32_to_cpu(nr->cmd->common.cdw10),
|
||||
le32_to_cpu(nr->cmd->common.cdw11),
|
||||
le32_to_cpu(nr->cmd->common.cdw12),
|
||||
le32_to_cpu(nr->cmd->common.cdw13),
|
||||
le32_to_cpu(nr->cmd->common.cdw14),
|
||||
le32_to_cpu(nr->cmd->common.cdw15));
|
||||
}
|
||||
|
||||
enum nvme_disposition {
|
||||
@@ -764,6 +764,10 @@ blk_status_t nvme_fail_nonready_command(struct nvme_ctrl *ctrl,
|
||||
!test_bit(NVME_CTRL_FAILFAST_EXPIRED, &ctrl->flags) &&
|
||||
!blk_noretry_request(rq) && !(rq->cmd_flags & REQ_NVME_MPATH))
|
||||
return BLK_STS_RESOURCE;
|
||||
|
||||
if (!(rq->rq_flags & RQF_DONTPREP))
|
||||
nvme_clear_nvme_request(rq);
|
||||
|
||||
return nvme_host_path_error(rq);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nvme_fail_nonready_command);
|
||||
@@ -3537,15 +3541,6 @@ static int nvme_init_identify(struct nvme_ctrl *ctrl)
|
||||
if (ret)
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
if (le16_to_cpu(id->awupf) != ctrl->subsys->awupf) {
|
||||
dev_err_ratelimited(ctrl->device,
|
||||
"inconsistent AWUPF, controller not added (%u/%u).\n",
|
||||
le16_to_cpu(id->awupf), ctrl->subsys->awupf);
|
||||
ret = -EINVAL;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
memcpy(ctrl->subsys->firmware_rev, id->fr,
|
||||
sizeof(ctrl->subsys->firmware_rev));
|
||||
|
||||
@@ -4077,7 +4072,7 @@ static void nvme_ns_add_to_ctrl_list(struct nvme_ns *ns)
|
||||
return;
|
||||
}
|
||||
}
|
||||
list_add(&ns->list, &ns->ctrl->namespaces);
|
||||
list_add_rcu(&ns->list, &ns->ctrl->namespaces);
|
||||
}
|
||||
|
||||
static void nvme_alloc_ns(struct nvme_ctrl *ctrl, struct nvme_ns_info *info)
|
||||
|
||||
@@ -1928,10 +1928,10 @@ static void nvmet_tcp_alloc_queue(struct nvmet_tcp_port *port,
|
||||
struct sock *sk = queue->sock->sk;
|
||||
|
||||
/* Restore the default callbacks before starting upcall */
|
||||
read_lock_bh(&sk->sk_callback_lock);
|
||||
write_lock_bh(&sk->sk_callback_lock);
|
||||
sk->sk_user_data = NULL;
|
||||
sk->sk_data_ready = port->data_ready;
|
||||
read_unlock_bh(&sk->sk_callback_lock);
|
||||
write_unlock_bh(&sk->sk_callback_lock);
|
||||
if (!nvmet_tcp_try_peek_pdu(queue)) {
|
||||
if (!nvmet_tcp_tls_handshake(queue))
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user