提交 8b8f53af 编写于 作者: Y Yan, Zheng 提交者: Ilya Dryomov

ceph: fix dentry leak in splice_dentry()

In any case, d_splice_alias() does not drop reference of original
dentry.
Signed-off-by: N"Yan, Zheng" <zyan@redhat.com>
Reviewed-by: NJeff Layton <jlayton@redhat.com>
Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
上级 7daf201d
......@@ -1135,6 +1135,7 @@ static struct dentry *splice_dentry(struct dentry *dn, struct inode *in)
if (IS_ERR(realdn)) {
pr_err("splice_dentry error %ld %p inode %p ino %llx.%llx\n",
PTR_ERR(realdn), dn, in, ceph_vinop(in));
dput(dn);
dn = realdn; /* note realdn contains the error */
goto out;
} else if (realdn) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册