summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-05-23 13:02:13 +0300
committerChanho Park <chanho61.park@samsung.com>2014-03-20 17:34:37 +0900
commitb2e6ba5c98e477e286c4273b19bdc5472544c656 (patch)
treed972606c376cb81522e39111ed99b9171a34a4e9 /fs
parent59c25cc1bda84a5956fe8454deeef6ae7749d268 (diff)
downloadlinux-3.10-b2e6ba5c98e477e286c4273b19bdc5472544c656.tar.gz
linux-3.10-b2e6ba5c98e477e286c4273b19bdc5472544c656.tar.bz2
linux-3.10-b2e6ba5c98e477e286c4273b19bdc5472544c656.zip
f2fs: dereferencing an ERR_PTR
There is an error path where "dir" is an ERR_PTR. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/recovery.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index dcd8e860aad..0dd2ce1b492 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;
}