diff options
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r-- | fs/ext4/extents.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 1c94cca35ed1..c2789271e7b4 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c | |||
@@ -4428,6 +4428,9 @@ long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len) | |||
4428 | */ | 4428 | */ |
4429 | if (len <= EXT_UNINIT_MAX_LEN << blkbits) | 4429 | if (len <= EXT_UNINIT_MAX_LEN << blkbits) |
4430 | flags |= EXT4_GET_BLOCKS_NO_NORMALIZE; | 4430 | flags |= EXT4_GET_BLOCKS_NO_NORMALIZE; |
4431 | |||
4432 | /* Prevent race condition between unwritten */ | ||
4433 | ext4_flush_unwritten_io(inode); | ||
4431 | retry: | 4434 | retry: |
4432 | while (ret >= 0 && ret < max_blocks) { | 4435 | while (ret >= 0 && ret < max_blocks) { |
4433 | map.m_lblk = map.m_lblk + ret; | 4436 | map.m_lblk = map.m_lblk + ret; |