diff options
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r-- | fs/ext4/extents.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 797f0602a68f..e8758df2617b 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c | |||
@@ -2878,10 +2878,11 @@ static void ext4_falloc_update_inode(struct inode *inode, | |||
2878 | * Update only when preallocation was requested beyond | 2878 | * Update only when preallocation was requested beyond |
2879 | * the file size. | 2879 | * the file size. |
2880 | */ | 2880 | */ |
2881 | if (!(mode & FALLOC_FL_KEEP_SIZE) && | 2881 | if (!(mode & FALLOC_FL_KEEP_SIZE)) { |
2882 | new_size > i_size_read(inode)) { | 2882 | if (new_size > i_size_read(inode)) |
2883 | i_size_write(inode, new_size); | 2883 | i_size_write(inode, new_size); |
2884 | EXT4_I(inode)->i_disksize = new_size; | 2884 | if (new_size > EXT4_I(inode)->i_disksize) |
2885 | ext4_update_i_disksize(inode, new_size); | ||
2885 | } | 2886 | } |
2886 | 2887 | ||
2887 | } | 2888 | } |