1
0
Fork 0

ceph: fix dentry leak in splice_dentry()

[ Upstream commit 8b8f53af1e ]

In any case, d_splice_alias() does not drop reference of original
dentry.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
pull/10/head
Yan, Zheng 2018-06-19 18:20:34 +08:00 committed by Greg Kroah-Hartman
parent 4c3b0ae79f
commit 77c967872e
1 changed files with 1 additions and 0 deletions

View File

@ -1087,6 +1087,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) {