Skip to content

Commit 9245b4a

Browse files
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>
1 parent 65bd5da commit 9245b4a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

fs/ntfs3/file.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,8 @@ static ssize_t ntfs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
13981398
goto out;
13991399
}
14001400

1401-
ret = iomap_dio_rw(iocb, from, &ntfs_iomap_ops, NULL, 0, NULL, 0);
1401+
ret = iomap_dio_rw(iocb, from, &ntfs_iomap_ops, NULL,
1402+
IOMAP_DIO_FORCE_WAIT, NULL, 0);
14021403

14031404
if (ret == -ENOTBLK) {
14041405
/* Returns -ENOTBLK in case of a page invalidation failure for writes.*/

0 commit comments

Comments
 (0)