Skip to content

Commit

Permalink
ceph: properly put ceph_string reference after async create attempt
Browse files Browse the repository at this point in the history
The reference acquired by try_prep_async_create is currently leaked.
Ensure we put it.

Cc: [email protected]
Fixes: 9a8d03c ("ceph: attempt to do async create when possible")
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 Jan 26, 2022
1 parent 89d43d0 commit 932a9b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/ceph/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,8 +750,10 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
restore_deleg_ino(dir, req->r_deleg_ino);
ceph_mdsc_put_request(req);
try_async = false;
ceph_put_string(rcu_dereference_raw(lo.pool_ns));
goto retry;
}
ceph_put_string(rcu_dereference_raw(lo.pool_ns));
goto out_req;
}
}
Expand Down

0 comments on commit 932a9b5

Please sign in to comment.