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 'block-6.15-20250522' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:

- Fix for a regression with setting up loop on a file system
without ->write_iter()

- Fix for an nvme sysfs regression

* tag 'block-6.15-20250522' of git://git.kernel.dk/linux:
nvme: avoid creating multipath sysfs group under namespace path devices
loop: don't require ->write_iter for writable files in loop_configure

+28 -3
-3
drivers/block/loop.c
··· 979 979 if (!file) 980 980 return -EBADF; 981 981 982 - if ((mode & BLK_OPEN_WRITE) && !file->f_op->write_iter) 983 - return -EINVAL; 984 - 985 982 error = loop_check_backing_file(file); 986 983 if (error) 987 984 return error;
+28
drivers/nvme/host/sysfs.c
··· 306 306 }; 307 307 308 308 #ifdef CONFIG_NVME_MULTIPATH 309 + /* 310 + * NOTE: The dummy attribute does not appear in sysfs. It exists solely to allow 311 + * control over the visibility of the multipath sysfs node. Without at least one 312 + * attribute defined in nvme_ns_mpath_attrs[], the sysfs implementation does not 313 + * invoke the multipath_sysfs_group_visible() method. As a result, we would not 314 + * be able to control the visibility of the multipath sysfs node. 315 + */ 316 + static struct attribute dummy_attr = { 317 + .name = "dummy", 318 + }; 319 + 309 320 static struct attribute *nvme_ns_mpath_attrs[] = { 321 + &dummy_attr, 310 322 NULL, 311 323 }; 324 + 325 + static bool multipath_sysfs_group_visible(struct kobject *kobj) 326 + { 327 + struct device *dev = container_of(kobj, struct device, kobj); 328 + 329 + return nvme_disk_is_ns_head(dev_to_disk(dev)); 330 + } 331 + 332 + static bool multipath_sysfs_attr_visible(struct kobject *kobj, 333 + struct attribute *attr, int n) 334 + { 335 + return false; 336 + } 337 + 338 + DEFINE_SYSFS_GROUP_VISIBLE(multipath_sysfs) 312 339 313 340 const struct attribute_group nvme_ns_mpath_attr_group = { 314 341 .name = "multipath", 315 342 .attrs = nvme_ns_mpath_attrs, 343 + .is_visible = SYSFS_GROUP_VISIBLE(multipath_sysfs), 316 344 }; 317 345 #endif 318 346