summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/inode.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2017-03-04 22:56:10 +0100
committerJaegeuk Kim <jaegeuk@kernel.org>2017-03-21 21:52:16 +0100
commit4f295443bff1701430249beec5eb9dc875decc9c (patch)
tree7e392b6ea2dab25b944da3b11138f6d2a3166ce9 /fs/f2fs/inode.c
parentf2fs: fix an error return value in truncate_partial_data_page (diff)
downloadlinux-4f295443bff1701430249beec5eb9dc875decc9c.tar.xz
linux-4f295443bff1701430249beec5eb9dc875decc9c.zip
f2fs: don't need to invalidate wrong node page
If f2fs_new_inode() is failed, the bad inode will invalidate 0'th node page during f2fs_evict_inode(), which doesn't need to do. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/inode.c')
-rw-r--r--fs/f2fs/inode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index 24bb8213d974..ef8610bf950f 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -411,7 +411,10 @@ no_delete:
stat_dec_inline_dir(inode);
stat_dec_inline_inode(inode);
- invalidate_mapping_pages(NODE_MAPPING(sbi), inode->i_ino, inode->i_ino);
+ /* ino == 0, if f2fs_new_inode() was failed t*/
+ if (inode->i_ino)
+ invalidate_mapping_pages(NODE_MAPPING(sbi), inode->i_ino,
+ inode->i_ino);
if (xnid)
invalidate_mapping_pages(NODE_MAPPING(sbi), xnid, xnid);
if (inode->i_nlink) {