Skip to contentSkip to conversation

ceph: fix inode refcount leak when ceph_fill_inode on non-I_NEW inode fails

PATCH New Jeff Layton 1 participant 1 message Nov 12, 2020 Ceph client

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ceph: fix inode refcount leak when ceph_fill_inode on non-I_NEW inode fails

---
 fs/ceph/inode.c | 2 ++
 1 file changed, 2 insertions(+)
fs/ceph/inode.c +2 -0
index ab02966ef0a4..88bbeb05bd27 100644
@@ -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;
Signature · 1 line
2.28.0