diff options
author | Yan, Zheng <zyan@redhat.com> | 2018-06-19 18:20:34 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-08-24 13:09:07 +0200 |
commit | 77c967872e8efe1341696bacfa1f793aedcc9f0d (patch) | |
tree | 0645955601c05c2e5df8bc47ed33a5af65874205 | |
parent | 4c3b0ae79f0736993c444980c40ebf7a103b6f39 (diff) | |
download | linux-77c967872e8efe1341696bacfa1f793aedcc9f0d.tar.gz |
ceph: fix dentry leak in splice_dentry()
[ Upstream commit 8b8f53af1ed9df88a4c0fbfdf3db58f62060edf3 ]
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>
-rw-r--r-- | fs/ceph/inode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index f2550a076edc4..d5124ed35154e 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -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) { |