git: 27481c268916 - main - nvme: Fix backwards sense of error condition
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 18 Nov 2025 21:04:49 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=27481c268916b0790c7ad16202a5b012625ce1a8
commit 27481c268916b0790c7ad16202a5b012625ce1a8
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2025-11-18 20:07:11 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-11-18 20:12:18 +0000
nvme: Fix backwards sense of error condition
b21e67875bf0c tested for the good condition, not the error condition, so
we'd never do anything else in this function. This was causing certain
logging not to happen, and also prevented forthcoming namespace size
change code from working as well.
Fixes: b21e67875bf0c
Sponsored by: Netflix
---
sys/dev/nvme/nvme_ctrlr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c
index ab06c1d553d7..34d4abd826b7 100644
--- a/sys/dev/nvme/nvme_ctrlr.c
+++ b/sys/dev/nvme/nvme_ctrlr.c
@@ -1153,7 +1153,7 @@ nvme_ctrlr_aer_task(void *arg, int pending)
mtx_sleep(aer, &aer->mtx, PRIBIO, "nvme_pt", 0);
mtx_unlock(&aer->mtx);
- if (aer->log_page_size != (uint32_t)-1) {
+ if (aer->log_page_size == (uint32_t)-1) {
/*
* If the log page fetch for some reason completed with an
* error, don't pass log page data to the consumers. In