]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
loop: add file_start_write() and file_end_write()
authorMing Lei <ming.lei@redhat.com>
Tue, 27 May 2025 15:34:05 +0000 (23:34 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2025 13:32:14 +0000 (15:32 +0200)
commit3091d4c0d069051979d6f668de99acf2d58b0a2f
tree95b0b9fb1bc05d83eb7adece158ab929d1e4bce3
parent4bd30962f308ed6ffef480e66d300b2fc5b8f592
loop: add file_start_write() and file_end_write()

[ Upstream commit 39d86db34e41b96bd86f1955cd0ce6cd9c5fca4c ]

file_start_write() and file_end_write() should be added around ->write_iter().

Recently we switch to ->write_iter() from vfs_iter_write(), and the
implied file_start_write() and file_end_write() are lost.

Also we never add them for dio code path, so add them back for covering
both.

Cc: Jeff Moyer <jmoyer@redhat.com>
Fixes: f2fed441c69b ("loop: stop using vfs_iter_{read,write} for buffered I/O")
Fixes: bc07c10a3603 ("block: loop: support DIO & AIO")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250527153405.837216-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/block/loop.c