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

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

+16 -21
+1
block/blk-sysfs.c
··· 960 960 elevator_set_none(q); 961 961 962 962 blk_debugfs_remove(disk); 963 + kobject_put(&disk->queue_kobj); 963 964 }
+2 -3
drivers/block/loop.c
··· 308 308 static void lo_rw_aio_do_completion(struct loop_cmd *cmd) 309 309 { 310 310 struct request *rq = blk_mq_rq_from_pdu(cmd); 311 - struct loop_device *lo = rq->q->queuedata; 312 311 313 312 if (!atomic_dec_and_test(&cmd->ref)) 314 313 return; 315 314 kfree(cmd->bvec); 316 315 cmd->bvec = NULL; 317 316 if (req_op(rq) == REQ_OP_WRITE) 318 - file_end_write(lo->lo_backing_file); 317 + kiocb_end_write(&cmd->iocb); 319 318 if (likely(!blk_should_fake_timeout(rq->q))) 320 319 blk_mq_complete_request(rq); 321 320 } ··· 390 391 } 391 392 392 393 if (rw == ITER_SOURCE) { 393 - file_start_write(lo->lo_backing_file); 394 + kiocb_start_write(&cmd->iocb); 394 395 ret = file->f_op->write_iter(&cmd->iocb, &iter); 395 396 } else 396 397 ret = file->f_op->read_iter(&cmd->iocb, &iter);
+11 -16
drivers/nvme/host/core.c
··· 381 381 nr->status & NVME_SC_MASK, /* Status Code */ 382 382 nr->status & NVME_STATUS_MORE ? "MORE " : "", 383 383 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)); 390 390 } 391 391 392 392 enum nvme_disposition { ··· 764 764 !test_bit(NVME_CTRL_FAILFAST_EXPIRED, &ctrl->flags) && 765 765 !blk_noretry_request(rq) && !(rq->cmd_flags & REQ_NVME_MPATH)) 766 766 return BLK_STS_RESOURCE; 767 + 768 + if (!(rq->rq_flags & RQF_DONTPREP)) 769 + nvme_clear_nvme_request(rq); 770 + 767 771 return nvme_host_path_error(rq); 768 772 } 769 773 EXPORT_SYMBOL_GPL(nvme_fail_nonready_command); ··· 3541 3537 if (ret) 3542 3538 goto out_free; 3543 3539 } 3544 - 3545 - if (le16_to_cpu(id->awupf) != ctrl->subsys->awupf) { 3546 - dev_err_ratelimited(ctrl->device, 3547 - "inconsistent AWUPF, controller not added (%u/%u).\n", 3548 - le16_to_cpu(id->awupf), ctrl->subsys->awupf); 3549 - ret = -EINVAL; 3550 - goto out_free; 3551 - } 3552 - 3553 3540 memcpy(ctrl->subsys->firmware_rev, id->fr, 3554 3541 sizeof(ctrl->subsys->firmware_rev)); 3555 3542 ··· 4072 4077 return; 4073 4078 } 4074 4079 } 4075 - list_add(&ns->list, &ns->ctrl->namespaces); 4080 + list_add_rcu(&ns->list, &ns->ctrl->namespaces); 4076 4081 } 4077 4082 4078 4083 static void nvme_alloc_ns(struct nvme_ctrl *ctrl, struct nvme_ns_info *info)
+2 -2
drivers/nvme/target/tcp.c
··· 1928 1928 struct sock *sk = queue->sock->sk; 1929 1929 1930 1930 /* Restore the default callbacks before starting upcall */ 1931 - read_lock_bh(&sk->sk_callback_lock); 1931 + write_lock_bh(&sk->sk_callback_lock); 1932 1932 sk->sk_user_data = NULL; 1933 1933 sk->sk_data_ready = port->data_ready; 1934 - read_unlock_bh(&sk->sk_callback_lock); 1934 + write_unlock_bh(&sk->sk_callback_lock); 1935 1935 if (!nvmet_tcp_try_peek_pdu(queue)) { 1936 1936 if (!nvmet_tcp_tls_handshake(queue)) 1937 1937 return;