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

Merge tag 'block-6.15-20250509' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:

- Fix for a regression in this series for loop and read/write iterator
handling

- zone append block update tweak

- remove a broken IO priority test

- NVMe pull request via Christoph:
- unblock ctrl state transition for firmware update (Daniel
Wagner)

* tag 'block-6.15-20250509' of git://git.kernel.dk/linux:
block: remove test of incorrect io priority level
nvme: unblock ctrl state transition for firmware update
block: only update request sector if needed
loop: Add sanity check for read/write_iter

+28 -7
+2 -1
block/blk.h
··· 480 480 * the original BIO sector so that blk_zone_write_plug_bio_endio() can 481 481 * lookup the zone write plug. 482 482 */ 483 - if (req_op(rq) == REQ_OP_ZONE_APPEND || bio_zone_write_plugging(bio)) 483 + if (req_op(rq) == REQ_OP_ZONE_APPEND || 484 + bio_flagged(bio, BIO_EMULATES_ZONE_APPEND)) 484 485 bio->bi_iter.bi_sector = rq->__sector; 485 486 } 486 487 void blk_zone_write_plug_bio_endio(struct bio *bio);
+1 -5
block/ioprio.c
··· 46 46 */ 47 47 if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_NICE)) 48 48 return -EPERM; 49 - fallthrough; 50 - /* rt has prio field too */ 51 - case IOPRIO_CLASS_BE: 52 - if (level >= IOPRIO_NR_LEVELS) 53 - return -EINVAL; 54 49 break; 50 + case IOPRIO_CLASS_BE: 55 51 case IOPRIO_CLASS_IDLE: 56 52 break; 57 53 case IOPRIO_CLASS_NONE:
+23
drivers/block/loop.c
··· 505 505 lo->lo_min_dio_size = loop_query_min_dio_size(lo); 506 506 } 507 507 508 + static int loop_check_backing_file(struct file *file) 509 + { 510 + if (!file->f_op->read_iter) 511 + return -EINVAL; 512 + 513 + if ((file->f_mode & FMODE_WRITE) && !file->f_op->write_iter) 514 + return -EINVAL; 515 + 516 + return 0; 517 + } 518 + 508 519 /* 509 520 * loop_change_fd switched the backing store of a loopback device to 510 521 * a new file. This is useful for operating system installers to free up ··· 536 525 537 526 if (!file) 538 527 return -EBADF; 528 + 529 + error = loop_check_backing_file(file); 530 + if (error) 531 + return error; 539 532 540 533 /* suppress uevents while reconfiguring the device */ 541 534 dev_set_uevent_suppress(disk_to_dev(lo->lo_disk), 1); ··· 978 963 979 964 if (!file) 980 965 return -EBADF; 966 + 967 + if ((mode & BLK_OPEN_WRITE) && !file->f_op->write_iter) 968 + return -EINVAL; 969 + 970 + error = loop_check_backing_file(file); 971 + if (error) 972 + return error; 973 + 981 974 is_loop = is_loop_device(file); 982 975 983 976 /* This is safe, since we have a reference from open(). */
+2 -1
drivers/nvme/host/core.c
··· 4493 4493 msleep(100); 4494 4494 } 4495 4495 4496 - if (!nvme_change_ctrl_state(ctrl, NVME_CTRL_LIVE)) 4496 + if (!nvme_change_ctrl_state(ctrl, NVME_CTRL_CONNECTING) || 4497 + !nvme_change_ctrl_state(ctrl, NVME_CTRL_LIVE)) 4497 4498 return; 4498 4499 4499 4500 nvme_unquiesce_io_queues(ctrl);