diff mbox series

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

Message ID 20220519144555.22197-1-hare@suse.de (mailing list archive)
State New, archived
Headers show
Series nvme-fc: mask out blkcg_get_fc_appid() if BLK_CGROUP_FC_APPID is not set | expand

Commit Message

Hannes Reinecke May 19, 2022, 2:45 p.m. UTC
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 <muneendra.kumar@broadcom.com>
Cc: James Smart <jsmart2021@gmail.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/nvme/host/fc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Jens Axboe May 19, 2022, 2:50 p.m. UTC | #1
On 5/19/22 8:45 AM, Hannes Reinecke wrote:
> 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.
Hannes Reinecke May 19, 2022, 2:55 p.m. UTC | #2
On 5/19/22 07:50, Jens Axboe wrote:
> On 5/19/22 8:45 AM, Hannes Reinecke wrote:
>> 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
Jens Axboe May 19, 2022, 2:57 p.m. UTC | #3
On 5/19/22 8:55 AM, Hannes Reinecke wrote:
> On 5/19/22 07:50, Jens Axboe wrote:
>> On 5/19/22 8:45 AM, Hannes Reinecke wrote:
>>> 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?

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.
Christoph Hellwig May 19, 2022, 2:59 p.m. UTC | #4
On Thu, May 19, 2022 at 08:57:53AM -0600, Jens Axboe wrote:
> 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.
Jens Axboe May 19, 2022, 3:03 p.m. UTC | #5
On 5/19/22 8:59 AM, Christoph Hellwig wrote:
> On Thu, May 19, 2022 at 08:57:53AM -0600, Jens Axboe wrote:
>> 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.
diff mbox series

Patch

diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index a11c69e68118..3c778bb0c294 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -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);