From 5e6e241f23b84c83f05ebe9d3a9f113917ebf337 Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Tue, 21 Nov 2023 12:33:06 -0500 Subject: [PATCH] EX-7601 osc: give compress_request explicit success Compress_request has explicit failure handling, but the success handling just follows the failure handling. This is confusing - on failure, we do: page_count = *pcount then immediately do: *pcount = page_count It also sets *orig_pga = pga on success OR failure, which is wrong because compress_request may have modified pga and then failed. Signed-off-by: Patrick Farrell Change-Id: I121ec71cfe35babc4a572951e93f7581887ade80 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53119 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- lustre/osc/osc_request.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index cb07d28..38e7ac1 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -1615,9 +1615,10 @@ osc_brw_prep_request(int cmd, struct client_obd *cli, struct obdo *oa, */ page_count = *pcount; compressed = 0; + } else /* success */ { + *pcount = page_count; + *orig_pga = pga; } - *pcount = page_count; - *orig_pga = pga; } else if (opc == OST_READ && compressed) { for (i = 0; i < page_count; i++) { struct brw_page *brwpg = pga[i]; -- 1.8.3.1