1
0
Fork 0

qnx6_lookup: switch to d_splice_alias()

... and hash negative lookups

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
hifive-unleashed-5.1
Al Viro 2018-04-30 23:07:15 -04:00
parent 191ac107f9
commit c1481700f4
1 changed files with 2 additions and 6 deletions

View File

@ -29,15 +29,11 @@ struct dentry *qnx6_lookup(struct inode *dir, struct dentry *dentry,
if (ino) { if (ino) {
foundinode = qnx6_iget(dir->i_sb, ino); foundinode = qnx6_iget(dir->i_sb, ino);
qnx6_put_page(page); qnx6_put_page(page);
if (IS_ERR(foundinode)) { if (IS_ERR(foundinode))
pr_debug("lookup->iget -> error %ld\n", pr_debug("lookup->iget -> error %ld\n",
PTR_ERR(foundinode)); PTR_ERR(foundinode));
return ERR_CAST(foundinode);
}
} else { } else {
pr_debug("%s(): not found %s\n", __func__, name); pr_debug("%s(): not found %s\n", __func__, name);
return NULL;
} }
d_add(dentry, foundinode); return d_splice_alias(foundinode, dentry);
return NULL;
} }