openpromfs: switch to d_splice_alias()
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 3 May 2018 13:46:23 +0000 (09:46 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 22 May 2018 18:27:57 +0000 (14:27 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/openpromfs/inode.c

index 2200662a9bf186ae54dfc92573cfe00f589c1858..607092f367ad9294fa7401047a7efc6605063d82 100644 (file)
@@ -256,8 +256,7 @@ found:
                break;
        }
 
-       d_add(dentry, inode);
-       return NULL;
+       return d_splice_alias(inode, dentry);
 }
 
 static int openpromfs_readdir(struct file *file, struct dir_context *ctx)