OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72ff0b0
)
minix_lookup: use d_splice_alias()
author
Al Viro
<viro@zeniv.linux.org.uk>
Mon, 30 Apr 2018 23:57:34 +0000
(19:57 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Tue, 22 May 2018 18:27:52 +0000
(14:27 -0400)
code is simpler that way
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/minix/namei.c
patch
|
blob
|
history
diff --git
a/fs/minix/namei.c
b/fs/minix/namei.c
index
ccf0f00
..
1a6084d
100644
(file)
--- 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)