aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/inode.c
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2014-08-03 21:54:58 -0400
committerJaegeuk Kim <jaegeuk@kernel.org>2014-08-04 16:01:22 -0400
commit002a41cabb5829d59c0337dcb5fa3893e0bb15fd (patch)
treecaf176ab2b117c097ab240caccb3e4075f888fcd /fs/f2fs/inode.c
parent70cfed88efa760fd165fc413cfd1801b5cc8acd2 (diff)
f2fs: invalidate xattr node page when evict inode
When inode is evicted, all the page cache belong to this inode should be released including the xattr node page. But previously we didn't do this, this patch fixed this issue. v2: o reposition invalidate_mapping_pages() to the right place suggested by Jaegeuk Kim. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/inode.c')
-rw-r--r--fs/f2fs/inode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index 0e69aa90238d..2c39999f3868 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -267,6 +267,7 @@ int f2fs_write_inode(struct inode *inode, struct writeback_control *wbc)
267void f2fs_evict_inode(struct inode *inode) 267void f2fs_evict_inode(struct inode *inode)
268{ 268{
269 struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb); 269 struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb);
270 nid_t xnid = F2FS_I(inode)->i_xattr_nid;
270 271
271 trace_f2fs_evict_inode(inode); 272 trace_f2fs_evict_inode(inode);
272 truncate_inode_pages_final(&inode->i_data); 273 truncate_inode_pages_final(&inode->i_data);
@@ -296,6 +297,8 @@ void f2fs_evict_inode(struct inode *inode)
296 sb_end_intwrite(inode->i_sb); 297 sb_end_intwrite(inode->i_sb);
297no_delete: 298no_delete:
298 invalidate_mapping_pages(NODE_MAPPING(sbi), inode->i_ino, inode->i_ino); 299 invalidate_mapping_pages(NODE_MAPPING(sbi), inode->i_ino, inode->i_ino);
300 if (xnid)
301 invalidate_mapping_pages(NODE_MAPPING(sbi), xnid, xnid);
299 if (is_inode_flag_set(F2FS_I(inode), FI_APPEND_WRITE)) 302 if (is_inode_flag_set(F2FS_I(inode), FI_APPEND_WRITE))
300 add_dirty_inode(sbi, inode->i_ino, APPEND_INO); 303 add_dirty_inode(sbi, inode->i_ino, APPEND_INO);
301 if (is_inode_flag_set(F2FS_I(inode), FI_UPDATE_WRITE)) 304 if (is_inode_flag_set(F2FS_I(inode), FI_UPDATE_WRITE))