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

Signed-off-by: Jeff Layton <[email protected]>
Reviewed-by: Ilya Dryomov <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
  • Loading branch information
jtlayton authored and idryomov committed Dec 14, 2020
1 parent ccd1acd commit 68cbb80
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/ceph/inode.c
Original file line number Diff line number Diff line change
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 68cbb80

Please sign in to comment.