All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] f2fs: don't need to invalidate wrong node page
@ 2017-03-06 21:51 ` Jaegeuk Kim
  0 siblings, 0 replies; 16+ messages in thread
From: Jaegeuk Kim @ 2017-03-06 21:51 UTC (permalink / raw)
  To: linux-kernel, linux-fsdevel, linux-f2fs-devel; +Cc: Jaegeuk Kim

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.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/inode.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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 @@ void f2fs_evict_inode(struct inode *inode)
 	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) {
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-03-09 12:08 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-06 21:51 [PATCH 1/2] f2fs: don't need to invalidate wrong node page Jaegeuk Kim
2017-03-06 21:51 ` Jaegeuk Kim
2017-03-06 21:51 ` [PATCH 2/2] f2fs: don't overwrite node block by SSR Jaegeuk Kim
2017-03-06 21:51   ` Jaegeuk Kim
2017-03-08 12:30   ` [f2fs-dev] " Chao Yu
2017-03-08 12:30     ` Chao Yu
2017-03-08 21:39     ` [f2fs-dev] " Jaegeuk Kim
2017-03-08 21:39       ` Jaegeuk Kim
2017-03-09 12:07       ` [f2fs-dev] " Chao Yu
2017-03-09 12:07         ` Chao Yu
2017-03-08 12:17 ` [f2fs-dev] [PATCH 1/2] f2fs: don't need to invalidate wrong node page Chao Yu
2017-03-08 12:17   ` Chao Yu
2017-03-08 21:35   ` Jaegeuk Kim
2017-03-08 21:35     ` Jaegeuk Kim
2017-03-09 11:36     ` [f2fs-dev] " Chao Yu
2017-03-09 11:36       ` Chao Yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.