OSDN Git Service

scsi: target: Check enforce_pr_isids during registration
authorMike Christie <michael.christie@oracle.com>
Thu, 2 Jul 2020 01:43:17 +0000 (20:43 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 8 Jul 2020 04:14:21 +0000 (00:14 -0400)
commit63c9ffe473d3eb0910cadd35685c93c3edeff19f
tree366c48730861efe4c7539f469b87385b7f1d39f6
parent86f2da1112ccf744ad9068b1d5d9843faf8ddee6
scsi: target: Check enforce_pr_isids during registration

Move the check for enforce_pr_isids to the registration code where we can
fail at the time an initiator tries to register a path without an isid. In
its current place in __core_scsi3_locate_pr_reg, it is too late because it
can be registered and be reported in PR in commands and it is stuck in this
state because we cannot unregister it.

[mkp: applied by hand]

Link: https://lore.kernel.org/r/1593654203-12442-2-git-send-email-michael.christie@oracle.com
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_pr.c