aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_device.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2015-06-10 08:41:23 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2015-06-15 23:26:03 -0700
commit196e2e2aa362850bf45bcb14b9517124b23b921e (patch)
tree65be24d2b0d650afe59e69c4749a853ebaa3ee0e /drivers/target/target_core_device.c
parenttarget: use 64-bit LUNs (diff)
downloadlinux-dev-196e2e2aa362850bf45bcb14b9517124b23b921e.tar.xz
linux-dev-196e2e2aa362850bf45bcb14b9517124b23b921e.zip
target: Remove TARGET_MAX_LUNS_PER_TRANSPORT
LUN allocation is now fully dynamic, so there is no need to artificially restrain the number of exported LUNs. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_device.c')
-rw-r--r--drivers/target/target_core_device.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
index 2ea7322c4dd4..ed084023e7d4 100644
--- a/drivers/target/target_core_device.c
+++ b/drivers/target/target_core_device.c
@@ -63,9 +63,6 @@ transport_lookup_cmd_lun(struct se_cmd *se_cmd, u64 unpacked_lun)
struct se_node_acl *nacl = se_sess->se_node_acl;
struct se_dev_entry *deve;
- if (unpacked_lun >= TRANSPORT_MAX_LUNS_PER_TPG)
- return TCM_NON_EXISTENT_LUN;
-
rcu_read_lock();
deve = target_nacl_find_deve(nacl, unpacked_lun);
if (deve) {
@@ -156,9 +153,6 @@ int transport_lookup_tmr_lun(struct se_cmd *se_cmd, u64 unpacked_lun)
struct se_tmr_req *se_tmr = se_cmd->se_tmr_req;
unsigned long flags;
- if (unpacked_lun >= TRANSPORT_MAX_LUNS_PER_TPG)
- return -ENODEV;
-
rcu_read_lock();
deve = target_nacl_find_deve(nacl, unpacked_lun);
if (deve) {
@@ -197,9 +191,6 @@ bool target_lun_is_rdonly(struct se_cmd *cmd)
struct se_dev_entry *deve;
bool ret;
- if (cmd->se_lun->lun_access & TRANSPORT_LUNFLAGS_READ_ONLY)
- return true;
-
rcu_read_lock();
deve = target_nacl_find_deve(se_sess->se_node_acl, cmd->orig_fe_lun);
ret = (deve && deve->lun_flags & TRANSPORT_LUNFLAGS_READ_ONLY);