Skip to content

Commit e5ac874

Browse files
committed
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
2 parents 7abc678 + 2680efd commit e5ac874

File tree

4 files changed

+16
-21
lines changed

4 files changed

+16
-21
lines changed

block/blk-sysfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -960,4 +960,5 @@ void blk_unregister_queue(struct gendisk *disk)
960960
elevator_set_none(q);
961961

962962
blk_debugfs_remove(disk);
963+
kobject_put(&disk->queue_kobj);
963964
}

drivers/block/loop.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,14 +308,13 @@ static void lo_complete_rq(struct request *rq)
308308
static void lo_rw_aio_do_completion(struct loop_cmd *cmd)
309309
{
310310
struct request *rq = blk_mq_rq_from_pdu(cmd);
311-
struct loop_device *lo = rq->q->queuedata;
312311

313312
if (!atomic_dec_and_test(&cmd->ref))
314313
return;
315314
kfree(cmd->bvec);
316315
cmd->bvec = NULL;
317316
if (req_op(rq) == REQ_OP_WRITE)
318-
file_end_write(lo->lo_backing_file);
317+
kiocb_end_write(&cmd->iocb);
319318
if (likely(!blk_should_fake_timeout(rq->q)))
320319
blk_mq_complete_request(rq);
321320
}
@@ -391,7 +390,7 @@ static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd,
391390
}
392391

393392
if (rw == ITER_SOURCE) {
394-
file_start_write(lo->lo_backing_file);
393+
kiocb_start_write(&cmd->iocb);
395394
ret = file->f_op->write_iter(&cmd->iocb, &iter);
396395
} else
397396
ret = file->f_op->read_iter(&cmd->iocb, &iter);

drivers/nvme/host/core.c

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -381,12 +381,12 @@ static void nvme_log_err_passthru(struct request *req)
381381
nr->status & NVME_SC_MASK, /* Status Code */
382382
nr->status & NVME_STATUS_MORE ? "MORE " : "",
383383
nr->status & NVME_STATUS_DNR ? "DNR " : "",
384-
nr->cmd->common.cdw10,
385-
nr->cmd->common.cdw11,
386-
nr->cmd->common.cdw12,
387-
nr->cmd->common.cdw13,
388-
nr->cmd->common.cdw14,
389-
nr->cmd->common.cdw15);
384+
le32_to_cpu(nr->cmd->common.cdw10),
385+
le32_to_cpu(nr->cmd->common.cdw11),
386+
le32_to_cpu(nr->cmd->common.cdw12),
387+
le32_to_cpu(nr->cmd->common.cdw13),
388+
le32_to_cpu(nr->cmd->common.cdw14),
389+
le32_to_cpu(nr->cmd->common.cdw15));
390390
}
391391

392392
enum nvme_disposition {
@@ -764,6 +764,10 @@ blk_status_t nvme_fail_nonready_command(struct nvme_ctrl *ctrl,
764764
!test_bit(NVME_CTRL_FAILFAST_EXPIRED, &ctrl->flags) &&
765765
!blk_noretry_request(rq) && !(rq->cmd_flags & REQ_NVME_MPATH))
766766
return BLK_STS_RESOURCE;
767+
768+
if (!(rq->rq_flags & RQF_DONTPREP))
769+
nvme_clear_nvme_request(rq);
770+
767771
return nvme_host_path_error(rq);
768772
}
769773
EXPORT_SYMBOL_GPL(nvme_fail_nonready_command);
@@ -3537,15 +3541,6 @@ static int nvme_init_identify(struct nvme_ctrl *ctrl)
35373541
if (ret)
35383542
goto out_free;
35393543
}
3540-
3541-
if (le16_to_cpu(id->awupf) != ctrl->subsys->awupf) {
3542-
dev_err_ratelimited(ctrl->device,
3543-
"inconsistent AWUPF, controller not added (%u/%u).\n",
3544-
le16_to_cpu(id->awupf), ctrl->subsys->awupf);
3545-
ret = -EINVAL;
3546-
goto out_free;
3547-
}
3548-
35493544
memcpy(ctrl->subsys->firmware_rev, id->fr,
35503545
sizeof(ctrl->subsys->firmware_rev));
35513546

@@ -4077,7 +4072,7 @@ static void nvme_ns_add_to_ctrl_list(struct nvme_ns *ns)
40774072
return;
40784073
}
40794074
}
4080-
list_add(&ns->list, &ns->ctrl->namespaces);
4075+
list_add_rcu(&ns->list, &ns->ctrl->namespaces);
40814076
}
40824077

40834078
static void nvme_alloc_ns(struct nvme_ctrl *ctrl, struct nvme_ns_info *info)

drivers/nvme/target/tcp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1928,10 +1928,10 @@ static void nvmet_tcp_alloc_queue(struct nvmet_tcp_port *port,
19281928
struct sock *sk = queue->sock->sk;
19291929

19301930
/* Restore the default callbacks before starting upcall */
1931-
read_lock_bh(&sk->sk_callback_lock);
1931+
write_lock_bh(&sk->sk_callback_lock);
19321932
sk->sk_user_data = NULL;
19331933
sk->sk_data_ready = port->data_ready;
1934-
read_unlock_bh(&sk->sk_callback_lock);
1934+
write_unlock_bh(&sk->sk_callback_lock);
19351935
if (!nvmet_tcp_try_peek_pdu(queue)) {
19361936
if (!nvmet_tcp_tls_handshake(queue))
19371937
return;

0 commit comments

Comments
 (0)