linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] f2fs: don't need to invalidate wrong node page
@ 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-08 12:17 ` [f2fs-dev] [PATCH 1/2] f2fs: don't need to invalidate wrong node page Chao Yu
  0 siblings, 2 replies; 8+ 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


------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford

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

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

Thread overview: 8+ 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 ` [PATCH 2/2] f2fs: don't overwrite node block by SSR Jaegeuk Kim
2017-03-08 12:30   ` Chao Yu
2017-03-08 21:39     ` Jaegeuk Kim
2017-03-09 12:07       ` [f2fs-dev] " 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 21:35   ` Jaegeuk Kim
2017-03-09 11:36     ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).