Files
Christoph Hellwig 7d783eb992 loop: don't require ->write_iter for writable files in loop_configure
[ Upstream commit 355341e435 ]

Block devices can be opened read-write even if they can't be written to
for historic reasons.  Remove the check requiring file->f_op->write_iter
when the block devices was opened in loop_configure. The call to
loop_check_backing_file just below ensures the ->write_iter is present
for backing files opened for writing, which is the only check that is
actually needed.

Fixes: f5c84eff63 ("loop: Add sanity check for read/write_iter")
Reported-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20250520135420.1177312-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-29 11:13:58 +02:00
..
2024-12-23 08:17:23 -07:00
2024-12-23 08:17:23 -07:00
2024-12-23 08:17:23 -07:00
2024-10-21 16:29:38 +02:00
2024-12-23 08:17:23 -07:00
2024-12-23 08:17:23 -07:00