From eb4246dc12da4a0369a91c10c2dfe8e2b0955818 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Fri, 27 May 2016 10:10:41 -0700 Subject: f2fs: return error of f2fs_lookup Now we can report an error to f2fs_lookup given by f2fs_find_entry. Suggested-by: He YunLei Signed-off-by: Jaegeuk Kim --- fs/f2fs/namei.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'fs/f2fs/namei.c') diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 3f6119e94a78..78efe00a3a2f 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -287,8 +287,11 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry, return ERR_PTR(-ENAMETOOLONG); de = f2fs_find_entry(dir, &dentry->d_name, &page); - if (!de) + if (!de) { + if (IS_ERR(page)) + return (struct dentry *)page; return d_splice_alias(inode, dentry); + } ino = le32_to_cpu(de->ino); f2fs_dentry_kunmap(dir, page); -- cgit v1.2.1