summaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2018-06-19 18:20:34 +0800
committerIlya Dryomov <idryomov@gmail.com>2018-06-26 18:42:44 +0200
commit8b8f53af1ed9df88a4c0fbfdf3db58f62060edf3 (patch)
tree4780ca0172a8bdbd80dae7b9d53b6285254799a8 /fs/ceph
parent7daf201d7fe8334e2d2364d4e8ed3394ec9af819 (diff)
downloadlinux-8b8f53af1ed9df88a4c0fbfdf3db58f62060edf3.tar.bz2
ceph: fix dentry leak in splice_dentry()
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>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index ee764ac352ab..a866be999216 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -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) {