|
@@ -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);
|