summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-05-23 13:02:13 +0300
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-05-28 15:03:04 +0900
commitf28c06fa6f3d3215a1ba5e62ebc5ce7229d7a895 (patch)
tree7e8030953c012b9c53a6476acaef7e44c7018034 /fs/f2fs
parent6f6fd833e1857e79a363fb20497237367bcfb7ee (diff)
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/f2fs')
-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;
}