diff options
-rw-r--r-- | drivers/target/target_core_device.c | 3 | ||||
-rw-r--r-- | drivers/target/target_core_pr.c | 6 | ||||
-rw-r--r-- | drivers/target/target_core_pr.h | 2 | ||||
-rw-r--r-- | drivers/target/target_core_tpg.c | 8 |
4 files changed, 14 insertions, 5 deletions
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index f5057a2f4ed1..d18dd8b532a8 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c | |||
@@ -1399,7 +1399,8 @@ int core_dev_add_initiator_node_lun_acl( | |||
1399 | * Check to see if there are any existing persistent reservation APTPL | 1399 | * Check to see if there are any existing persistent reservation APTPL |
1400 | * pre-registrations that need to be enabled for this LUN ACL.. | 1400 | * pre-registrations that need to be enabled for this LUN ACL.. |
1401 | */ | 1401 | */ |
1402 | core_scsi3_check_aptpl_registration(lun->lun_se_dev, tpg, lun, lacl); | 1402 | core_scsi3_check_aptpl_registration(lun->lun_se_dev, tpg, lun, nacl, |
1403 | lacl->mapped_lun); | ||
1403 | return 0; | 1404 | return 0; |
1404 | } | 1405 | } |
1405 | 1406 | ||
diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c index 48a801045176..a06edb59b67f 100644 --- a/drivers/target/target_core_pr.c +++ b/drivers/target/target_core_pr.c | |||
@@ -937,10 +937,10 @@ int core_scsi3_check_aptpl_registration( | |||
937 | struct se_device *dev, | 937 | struct se_device *dev, |
938 | struct se_portal_group *tpg, | 938 | struct se_portal_group *tpg, |
939 | struct se_lun *lun, | 939 | struct se_lun *lun, |
940 | struct se_lun_acl *lun_acl) | 940 | struct se_node_acl *nacl, |
941 | u32 mapped_lun) | ||
941 | { | 942 | { |
942 | struct se_node_acl *nacl = lun_acl->se_lun_nacl; | 943 | struct se_dev_entry *deve = nacl->device_list[mapped_lun]; |
943 | struct se_dev_entry *deve = nacl->device_list[lun_acl->mapped_lun]; | ||
944 | 944 | ||
945 | if (dev->dev_reservation_flags & DRF_SPC2_RESERVATIONS) | 945 | if (dev->dev_reservation_flags & DRF_SPC2_RESERVATIONS) |
946 | return 0; | 946 | return 0; |
diff --git a/drivers/target/target_core_pr.h b/drivers/target/target_core_pr.h index 2ee2936fa0bd..749fd7bb7510 100644 --- a/drivers/target/target_core_pr.h +++ b/drivers/target/target_core_pr.h | |||
@@ -60,7 +60,7 @@ extern int core_scsi3_alloc_aptpl_registration( | |||
60 | unsigned char *, u16, u32, int, int, u8); | 60 | unsigned char *, u16, u32, int, int, u8); |
61 | extern int core_scsi3_check_aptpl_registration(struct se_device *, | 61 | extern int core_scsi3_check_aptpl_registration(struct se_device *, |
62 | struct se_portal_group *, struct se_lun *, | 62 | struct se_portal_group *, struct se_lun *, |
63 | struct se_lun_acl *); | 63 | struct se_node_acl *, u32); |
64 | extern void core_scsi3_free_pr_reg_from_nacl(struct se_device *, | 64 | extern void core_scsi3_free_pr_reg_from_nacl(struct se_device *, |
65 | struct se_node_acl *); | 65 | struct se_node_acl *); |
66 | extern void core_scsi3_free_all_registrations(struct se_device *); | 66 | extern void core_scsi3_free_all_registrations(struct se_device *); |
diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c index 6ec58736d1a4..aa2b2d0998e3 100644 --- a/drivers/target/target_core_tpg.c +++ b/drivers/target/target_core_tpg.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <target/target_core_fabric.h> | 40 | #include <target/target_core_fabric.h> |
41 | 41 | ||
42 | #include "target_core_internal.h" | 42 | #include "target_core_internal.h" |
43 | #include "target_core_pr.h" | ||
43 | 44 | ||
44 | extern struct se_device *g_lun0_dev; | 45 | extern struct se_device *g_lun0_dev; |
45 | 46 | ||
@@ -166,6 +167,13 @@ void core_tpg_add_node_to_devs( | |||
166 | 167 | ||
167 | core_enable_device_list_for_node(lun, NULL, lun->unpacked_lun, | 168 | core_enable_device_list_for_node(lun, NULL, lun->unpacked_lun, |
168 | lun_access, acl, tpg); | 169 | lun_access, acl, tpg); |
170 | /* | ||
171 | * Check to see if there are any existing persistent reservation | ||
172 | * APTPL pre-registrations that need to be enabled for this dynamic | ||
173 | * LUN ACL now.. | ||
174 | */ | ||
175 | core_scsi3_check_aptpl_registration(dev, tpg, lun, acl, | ||
176 | lun->unpacked_lun); | ||
169 | spin_lock(&tpg->tpg_lun_lock); | 177 | spin_lock(&tpg->tpg_lun_lock); |
170 | } | 178 | } |
171 | spin_unlock(&tpg->tpg_lun_lock); | 179 | spin_unlock(&tpg->tpg_lun_lock); |