summaryrefslogtreecommitdiffstats
path: root/fs/minix
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2018-04-30 19:57:34 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2018-05-22 14:27:52 -0400
commitb0149516925680b86d94d03717af6ae1ab83ffa8 (patch)
tree9946cc20dd6391b8c0d8c74e48e6b0d0a1a25b0a /fs/minix
parent72ff0b038de27118a95a3c4c4d4a2126902899c6 (diff)
downloadlinux-b0149516925680b86d94d03717af6ae1ab83ffa8.tar.gz
linux-b0149516925680b86d94d03717af6ae1ab83ffa8.tar.bz2
linux-b0149516925680b86d94d03717af6ae1ab83ffa8.zip
minix_lookup: use d_splice_alias()
code is simpler that way Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/minix')
-rw-r--r--fs/minix/namei.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/minix/namei.c b/fs/minix/namei.c
index ccf0f00030bf..1a6084d2b02e 100644
--- a/fs/minix/namei.c
+++ b/fs/minix/namei.c
@@ -28,13 +28,9 @@ static struct dentry *minix_lookup(struct inode * dir, struct dentry *dentry, un
return ERR_PTR(-ENAMETOOLONG);
ino = minix_inode_by_name(dentry);
- if (ino) {
+ if (ino)
inode = minix_iget(dir->i_sb, ino);
- if (IS_ERR(inode))
- return ERR_CAST(inode);
- }
- d_add(dentry, inode);
- return NULL;
+ return d_splice_alias(inode, dentry);
}
static int minix_mknod(struct inode * dir, struct dentry *dentry, umode_t mode, dev_t rdev)