]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
loop: allow loop_set_status to re-enable direct I/O
authorChristoph Hellwig <hch@lst.de>
Fri, 10 Jan 2025 07:37:36 +0000 (08:37 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 10 Jan 2025 14:31:50 +0000 (07:31 -0700)
commit3a693110afd7127400cc9f779c885f01cf16d0f2
treeb2aa9fd7b16db598f0bd4288c3639ba5ec662d85
parentdc909525daec7c7c5d628683c99d26e281c1a7bb
loop: allow loop_set_status to re-enable direct I/O

Unlike all other calls of (__)loop_update_dio, loop_set_status never
looks at the O_DIRECT flag of the backing file, and thus doesn't
re-enable direct I/O on an O_DIRECT backing file if e.g. the new block
size would allow it.  Fix that and remove the need for the separate
__loop_update_dio flag.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20250110073750.1582447-7-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/loop.c