diff options
-rw-r--r-- | fs/ext4/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index d2c86633811f..b5edc6e4bab9 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -2508,7 +2508,7 @@ static int ext4_da_write_end(struct file *file, | |||
2508 | */ | 2508 | */ |
2509 | 2509 | ||
2510 | new_i_size = pos + copied; | 2510 | new_i_size = pos + copied; |
2511 | if (new_i_size > EXT4_I(inode)->i_disksize) { | 2511 | if (copied && new_i_size > EXT4_I(inode)->i_disksize) { |
2512 | if (ext4_da_should_update_i_disksize(page, end)) { | 2512 | if (ext4_da_should_update_i_disksize(page, end)) { |
2513 | down_write(&EXT4_I(inode)->i_data_sem); | 2513 | down_write(&EXT4_I(inode)->i_data_sem); |
2514 | if (new_i_size > EXT4_I(inode)->i_disksize) { | 2514 | if (new_i_size > EXT4_I(inode)->i_disksize) { |