minix_lookup: use d_splice_alias()
code is simpler that way Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Родитель
72ff0b038d
Коммит
b014951692
|
@ -28,13 +28,9 @@ static struct dentry *minix_lookup(struct inode * dir, struct dentry *dentry, un
|
||||||
return ERR_PTR(-ENAMETOOLONG);
|
return ERR_PTR(-ENAMETOOLONG);
|
||||||
|
|
||||||
ino = minix_inode_by_name(dentry);
|
ino = minix_inode_by_name(dentry);
|
||||||
if (ino) {
|
if (ino)
|
||||||
inode = minix_iget(dir->i_sb, ino);
|
inode = minix_iget(dir->i_sb, ino);
|
||||||
if (IS_ERR(inode))
|
return d_splice_alias(inode, dentry);
|
||||||
return ERR_CAST(inode);
|
|
||||||
}
|
|
||||||
d_add(dentry, inode);
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int minix_mknod(struct inode * dir, struct dentry *dentry, umode_t mode, dev_t rdev)
|
static int minix_mknod(struct inode * dir, struct dentry *dentry, umode_t mode, dev_t rdev)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче