]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
qnx6_lookup: switch to d_splice_alias()
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 1 May 2018 03:07:15 +0000 (23:07 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 22 May 2018 18:27:54 +0000 (14:27 -0400)
... and hash negative lookups

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/qnx6/namei.c

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