Skip to content

Commit

Permalink
libceph: use target_copy() in send_linger()
Browse files Browse the repository at this point in the history
Instead of copying just oloc, oid and flags, copy the entire
linger target.  This is more for consistency than anything else,
as send_linger() -> submit_request() -> __submit_request() sends
the request regardless of what calc_target() says (i.e. both on
CALC_TARGET_NO_ACTION and CALC_TARGET_NEED_RESEND).

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
  • Loading branch information
Ilya Dryomov committed Aug 3, 2020
1 parent bcf8768 commit 5133ba8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -3076,9 +3076,7 @@ static void send_linger(struct ceph_osd_linger_request *lreq)
cancel_linger_request(req);

request_reinit(req);
ceph_oid_copy(&req->r_base_oid, &lreq->t.base_oid);
ceph_oloc_copy(&req->r_base_oloc, &lreq->t.base_oloc);
req->r_flags = lreq->t.flags;
target_copy(&req->r_t, &lreq->t);
req->r_mtime = lreq->mtime;

mutex_lock(&lreq->lock);
Expand Down

0 comments on commit 5133ba8

Please sign in to comment.