Skip to content

Commit 86be0f2

Browse files
jtlaytongregkh
authored andcommitted
ceph: fix inode refcount leak when ceph_fill_inode on non-I_NEW inode fails
[ Upstream commit 68cbb80 ] Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 8bcfa17 commit 86be0f2

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎fs/ceph/inode.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,6 +1335,8 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req)
13351335
in, ceph_vinop(in));
13361336
if (in->i_state & I_NEW)
13371337
discard_new_inode(in);
1338+
else
1339+
iput(in);
13381340
goto done;
13391341
}
13401342
req->r_target_inode = in;

0 commit comments

Comments
 (0)