diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 3b8409ce24f2..bc89bc987513 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -3470,6 +3470,10 @@ static int f2fs_write_end(struct file *file, if (f2fs_compressed_file(inode) && fsdata) { f2fs_compress_write_end(inode, fsdata, page->index, copied); f2fs_update_time(F2FS_I_SB(inode), REQ_TIME); + + if (pos + copied > i_size_read(inode) && + !f2fs_verity_in_progress(inode)) + f2fs_i_size_write(inode, pos + copied); return copied; } #endif