提交 d023b3a1 编写于 作者: A Al Viro

cramfs_lookup(): use d_splice_alias()

simpler code that way, actually
Acked-by: NNicolas Pitre <nico@linaro.org>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 b455ecd4
......@@ -808,10 +808,7 @@ static struct dentry *cramfs_lookup(struct inode *dir, struct dentry *dentry, un
}
out:
mutex_unlock(&read_mutex);
if (IS_ERR(inode))
return ERR_CAST(inode);
d_add(dentry, inode);
return NULL;
return d_splice_alias(inode, dentry);
}
static int cramfs_readpage(struct file *file, struct page *page)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册