[01/10] openpromfs: switch to d_splice_alias()
diff mbox

Message ID 20180525235426.9750-1-viro@ZenIV.linux.org.uk
State New
Headers show

Commit Message

Al Viro May 25, 2018, 11:54 p.m. UTC
From: Al Viro <viro@zeniv.linux.org.uk>

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 fs/openpromfs/inode.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch
diff mbox

diff --git a/fs/openpromfs/inode.c b/fs/openpromfs/inode.c
index 2200662a9bf1..607092f367ad 100644
--- a/fs/openpromfs/inode.c
+++ b/fs/openpromfs/inode.c
@@ -256,8 +256,7 @@  static struct dentry *openpromfs_lookup(struct inode *dir, struct dentry *dentry
 		break;
 	}
 
-	d_add(dentry, inode);
-	return NULL;
+	return d_splice_alias(inode, dentry);
 }
 
 static int openpromfs_readdir(struct file *file, struct dir_context *ctx)