Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[platform/kernel/linux-starfive.git] / drivers / scsi / lpfc / lpfc_scsi.c
index 1d134a0..3b8afa9 100644 (file)
@@ -5527,7 +5527,9 @@ static char *lpfc_is_command_vm_io(struct scsi_cmnd *cmd)
 {
        struct bio *bio = scsi_cmd_to_rq(cmd)->bio;
 
-       return bio ? blkcg_get_fc_appid(bio) : NULL;
+       if (!IS_ENABLED(CONFIG_BLK_CGROUP_FC_APPID) || !bio)
+               return NULL;
+       return blkcg_get_fc_appid(bio);
 }
 
 /**