fs/ntfs3: force waiting for direct I/O completion

It makes ntfs3 wait for direct I/O completion before returning to the
caller, instead of allowing the write path to complete asynchronously.

The issue was discovered during internal tests.

Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
This commit is contained in:
Konstantin Komarov 2026-05-22 14:58:12 +02:00
parent 65bd5da999
commit 9245b4adb1
No known key found for this signature in database
GPG Key ID: A9B0331F832407B6

View File

@ -1398,7 +1398,8 @@ static ssize_t ntfs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
goto out;
}
ret = iomap_dio_rw(iocb, from, &ntfs_iomap_ops, NULL, 0, NULL, 0);
ret = iomap_dio_rw(iocb, from, &ntfs_iomap_ops, NULL,
IOMAP_DIO_FORCE_WAIT, NULL, 0);
if (ret == -ENOTBLK) {
/* Returns -ENOTBLK in case of a page invalidation failure for writes.*/