From: Justin M. Forbes <jforbes@xxxxxxxxxxxxxxxxx> Revert "loop: Add sanity check for read/write_iter" This causes loop device creation to fail in both CoreOS and regular Fedora CI testing. Lets revert in ark-latest until an upstream solution can be found. This reverts commit f5c84eff634ba003326aa034c414e2a9dcb7c6a7. diff --git a/drivers/block/loop.c b/drivers/block/loop.c index blahblah..blahblah 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -505,17 +505,6 @@ static void loop_assign_backing_file(struct loop_device *lo, struct file *file) lo->lo_min_dio_size = loop_query_min_dio_size(lo); } -static int loop_check_backing_file(struct file *file) -{ - if (!file->f_op->read_iter) - return -EINVAL; - - if ((file->f_mode & FMODE_WRITE) && !file->f_op->write_iter) - return -EINVAL; - - return 0; -} - /* * loop_change_fd switched the backing store of a loopback device to * a new file. This is useful for operating system installers to free up @@ -537,10 +526,6 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, if (!file) return -EBADF; - error = loop_check_backing_file(file); - if (error) - return error; - /* suppress uevents while reconfiguring the device */ dev_set_uevent_suppress(disk_to_dev(lo->lo_disk), 1); @@ -978,14 +963,6 @@ static int loop_configure(struct loop_device *lo, blk_mode_t mode, if (!file) return -EBADF; - - if ((mode & BLK_OPEN_WRITE) && !file->f_op->write_iter) - return -EINVAL; - - error = loop_check_backing_file(file); - if (error) - return error; - is_loop = is_loop_device(file); /* This is safe, since we have a reference from open(). */ -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3876 -- _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue