Skip to contentSkip to conversation

nvmet: fix rw control endian access

PATCH In review Keith Busch 2 participants 2 messages Jan 14, 2025 – Jan 15, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvmet: fix rw control endian access

From: Keith Busch <[email protected]>

Fixes 3ec5c62cfcf060e ("nvmet: handle rw's limited retry flag")
Cc Guixin Liu <[email protected]>
---
 drivers/nvme/target/io-cmd-bdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/target/io-cmd-bdev.c +1 -1
index 6380b60fd4900..2b09b2c69857a 100644
@@ -272,7 +272,7 @@ static void nvmet_bdev_execute_rw(struct nvmet_req *req)
 		iter_flags = SG_MITER_FROM_SG;
 	}
 
-	if (req->cmd->rw.control & NVME_RW_LR)
+	if (req->cmd->rw.control & cpu_to_le16(NVME_RW_LR))
 		opf |= REQ_FAILFAST_DEV;
 
 	if (is_pci_p2pdma_page(sg_page(req->sg)))
Signature · 1 line
2.43.5