public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] f2fs: dereferencing an ERR_PTR
@ 2013-05-23 10:02 Dan Carpenter
  2013-05-23 10:12 ` Dan Carpenter
  2013-05-26 15:05 ` walter harms
  0 siblings, 2 replies; 8+ messages in thread
From: Dan Carpenter @ 2013-05-23 10:02 UTC (permalink / raw)
  To: Jaegeuk Kim; +Cc: kernel-janitors, linux-f2fs-devel

There is an error path where "dir" is an ERR_PTR.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index 5148d90..921aede 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -71,7 +71,8 @@ static int recover_dentry(struct page *ipage, struct inode *inode)
 out:
 	f2fs_msg(inode->i_sb, KERN_NOTICE, "recover_inode and its dentry: "
 			"ino = %x, name = %s, dir = %lx, err = %d",
-			ino_of_node(ipage), raw_inode->i_name, dir->i_ino, err);
+			ino_of_node(ipage), raw_inode->i_name,
+			IS_ERR(dir) ? 0 : dir->i_ino, err);
 	return err;
 }
 

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

end of thread, other threads:[~2013-05-27  7:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-23 10:02 [patch] f2fs: dereferencing an ERR_PTR Dan Carpenter
2013-05-23 10:12 ` Dan Carpenter
2013-05-24  3:46   ` Jaegeuk Kim
2013-05-24 11:23     ` Dan Carpenter
2013-05-24 11:32       ` Jaegeuk Kim
2013-05-26 15:05 ` walter harms
2013-05-26 20:41   ` Dan Carpenter
2013-05-27  7:13     ` walter harms

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox