From 68cbb8056a4c24c6a38ad2b79e0a9764b235e8fa Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Thu, 12 Nov 2020 09:37:59 -0500 Subject: ceph: fix inode refcount leak when ceph_fill_inode on non-I_NEW inode fails Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov --- fs/ceph/inode.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/ceph') 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; -- cgit v1.2.3