diff options
Diffstat (limited to 'fs/ext4/file.c')
-rw-r--r-- | fs/ext4/file.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 98ec11f69cd4..2c5baa5e8291 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c | |||
@@ -264,6 +264,13 @@ ext4_file_write_iter(struct kiocb *iocb, struct iov_iter *from) | |||
264 | } | 264 | } |
265 | 265 | ||
266 | ret = __generic_file_write_iter(iocb, from); | 266 | ret = __generic_file_write_iter(iocb, from); |
267 | /* | ||
268 | * Unaligned direct AIO must be the only IO in flight. Otherwise | ||
269 | * overlapping aligned IO after unaligned might result in data | ||
270 | * corruption. | ||
271 | */ | ||
272 | if (ret == -EIOCBQUEUED && unaligned_aio) | ||
273 | ext4_unwritten_wait(inode); | ||
267 | inode_unlock(inode); | 274 | inode_unlock(inode); |
268 | 275 | ||
269 | if (ret > 0) | 276 | if (ret > 0) |