Skip to contentSkip to conversation

nvme-fc: mask out blkcg_get_fc_appid() if BLK_CGROUP_FC_APPID is not set

PATCH In review Hannes Reinecke 3 participants 6 messages May 19, 2022

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

PATCH 1/1 nvme-fc: mask out blkcg_get_fc_appid() if BLK_CGROUP_FC_APPID is not set

If BLK_CGROUP_FC_APPID is not configured the symbol blkcg_get_fc_appid() is undefined, so it needs to be masked out.

This patch is just a diff to the v2 patchset, as the original version has already been merged.

Fixes 980a0e068d14 ("scsi: nvme-fc: Add new routine nvme_fc_io_getuuid()")
Cc Muneendra <[email protected]>
Cc James Smart <[email protected]>
---
 drivers/nvme/host/fc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/nvme/host/fc.c +3 -1
index a11c69e68118..3c778bb0c294 100644
@@ -1911,7 +1911,9 @@ char *nvme_fc_io_getuuid(struct nvmefc_fcp_req *req)
 	struct nvme_fc_fcp_op *op = fcp_req_to_fcp_op(req);
 	struct request *rq = op->rq;
 
-	return rq->bio ? blkcg_get_fc_appid(rq->bio) : NULL;
+	if (!IS_ENABLED(CONFIG_BLK_CGROUP_FC_APPID) || !rq->bio)
+		return NULL;
+	return blkcg_get_fc_appid(rq->bio);
 }
 EXPORT_SYMBOL_GPL(nvme_fc_io_getuuid);
 
Signature · 1 line
2.29.2
maintainer
#1 lore raw
Quoted 7 lines · Hannes Reinecke

If BLK_CGROUP_FC_APPID is not configured the symbol blkcg_get_fc_appid() is undefined, so it needs to be masked out.

This patch is just a diff to the v2 patchset, as the original version has already been merged.

Fixes 980a0e068d14 ("scsi: nvme-fc: Add new routine nvme_fc_io_getuuid()")

Either this sha is wrong too, or it's not in my tree yet the breakage is.

Signature · 1 line
Jens Axboe
author Applied
#2 lore raw
Quoted 11 lines · Jens Axboe
Quoted 7 lines · Hannes Reinecke

If BLK_CGROUP_FC_APPID is not configured the symbol blkcg_get_fc_appid() is undefined, so it needs to be masked out.

This patch is just a diff to the v2 patchset, as the original version has already been merged.

Fixes 980a0e068d14 ("scsi: nvme-fc: Add new routine nvme_fc_io_getuuid()")

Either this sha is wrong too, or it's not in my tree yet the breakage is.

Picked up from linux-next.
Which tree should I look at?

Cheers,

Hannes

Signature · 5 lines
Dr. Hannes Reinecke                Kernel Storage Architect
[email protected]                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman
maintainer
#3 lore raw
Quoted 8 lines · Hannes Reinecke
Quoted 7 lines · Jens Axboe
Quoted 6 lines · Hannes Reinecke

If BLK_CGROUP_FC_APPID is not configured the symbol blkcg_get_fc_appid() is undefined, so it needs to be masked out.

This patch is just a diff to the v2 patchset, as the original version has already been merged.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Fixes 980a0e068d14 ("scsi: nvme-fc: Add new routine nvme_fc_io_getuuid()")

Either this sha is wrong too, or it's not in my tree yet the breakage is.

Picked up from linux-next.
Which tree should I look at?

I'm assuming that commit is from the scsi tree? It's certainly not in mine. So your commit message may be correct, but since it was sent to me, I was assuming it's breakage from my tree. Which doesn't appear to be the case, and I don't see any of the SCSI maintainers on the to/cc.

Signature · 1 line
Jens Axboe
#4 lore raw
Quoted 4 lines · Jens Axboe

I'm assuming that commit is from the scsi tree? It's certainly not in mine. So your commit message may be correct, but since it was sent to me, I was assuming it's breakage from my tree. Which doesn't appear to be the case, and I don't see any of the SCSI maintainers on the to/cc.

Yes, all this went in through the scsi tree.

maintainer
#5 lore raw
Quoted 7 lines · Christoph Hellwig
Quoted 4 lines · Jens Axboe

I'm assuming that commit is from the scsi tree? It's certainly not in mine. So your commit message may be correct, but since it was sent to me, I was assuming it's breakage from my tree. Which doesn't appear to be the case, and I don't see any of the SCSI maintainers on the to/cc.

Yes, all this went in through the scsi tree.

OK, Hannes please send it to the SCSI list/folks then.

Signature · 1 line
Jens Axboe