diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 845eebc0b3e6..9891f2f800e6 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -204,6 +204,8 @@ void f2fs_abort_atomic_write(struct inode *inode, bool clean) f2fs_i_size_write(inode, fi->original_i_size); fi->original_i_size = 0; } + /* avoid stale dirty inode during eviction */ + sync_inode_metadata(inode, 0); } static int __replace_atomic_write_block(struct inode *inode, pgoff_t index,