[PATCH] drbd: Fix seq_num numeric conversion error
"zhengbing.huang" <[email protected]> Tue, 22 Oct 2024 19:41:51 +0800
| Newsgroups | dev.linux.lists.drbd-dev |
|---|---|
| Message-ID | <[email protected]> |
seq_num is a 32-bit value and should not be converted with be64_to_cpu(). Signed-off-by: zhengbing.huang <[email protected]> --- drbd/drbd_receiver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drbd/drbd_receiver.c b/drbd/drbd_receiver.c index 4f0670f42..4d3ab28b3 100644 --- a/drbd/drbd_receiver.c +++ b/drbd/drbd_receiver.c @@ -2217,7 +2217,7 @@ static void p_req_detail_from_pi(struct drbd_connection *connection, d->sector = be64_to_cpu(p->p_data.sector); d->block_id = p->p_data.block_id; - d->peer_seq = be64_to_cpu(p->p_data.seq_num); + d->peer_seq = be32_to_cpu(p->p_data.seq_num); d->dp_flags = be32_to_cpu(p->p_data.dp_flags); d->length = pi->size; d->bi_size = is_trim_or_zeroes ? be32_to_cpu(p->size) : pi->size - digest_size; -- 2.17.1