diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 10491ae1cb850..329afa55a581c 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -3353,6 +3353,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