summaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2020-11-12 09:37:59 -0500
committerIlya Dryomov <idryomov@gmail.com>2020-12-14 23:21:47 +0100
commit68cbb8056a4c24c6a38ad2b79e0a9764b235e8fa (patch)
tree7c34e7a1510bd38472c5f7d59f704be617fe22c4 /fs/ceph
parentccd1acdf1c49b835504b235461fd24e2ed826764 (diff)
downloadlinux-68cbb8056a4c24c6a38ad2b79e0a9764b235e8fa.tar.bz2
ceph: fix inode refcount leak when ceph_fill_inode on non-I_NEW inode fails
Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/inode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 12140da244f3..ada906280e3a 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -1335,6 +1335,8 @@ retry_lookup:
in, ceph_vinop(in));
if (in->i_state & I_NEW)
discard_new_inode(in);
+ else
+ iput(in);
goto done;
}
req->r_target_inode = in;