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 <pfarrell@whamcloud.com>
Change-Id: I121ec71cfe35babc4a572951e93f7581887ade80
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53119
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
*/
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];