diff options
author | Yan, Zheng | 2018-06-19 18:20:34 +0800 |
---|---|---|
committer | Ilya Dryomov | 2018-06-26 18:42:44 +0200 |
commit | 8b8f53af1ed9df88a4c0fbfdf3db58f62060edf3 (patch) | |
tree | 4780ca0172a8bdbd80dae7b9d53b6285254799a8 /fs/ceph/inode.c | |
parent | 7daf201d7fe8334e2d2364d4e8ed3394ec9af819 (diff) |
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/inode.c')
-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 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) { |