Skip to content

Commit

Permalink
ceph: fix inode refcount leak when ceph_fill_inode on non-I_NEW inode…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
jtlayton authored and gregkh committed Jan 6, 2021
1 parent 8bcfa17 commit 86be0f2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/ceph/inode.c
Expand Up @@ -1335,6 +1335,8 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req)
in, ceph_vinop(in));
if (in->i_state & I_NEW)
discard_new_inode(in);
else
iput(in);
goto done;
}
req->r_target_inode = in;
Expand Down

0 comments on commit 86be0f2

Please sign in to comment.