aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2012-06-07 13:38:50 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-07-16 20:29:11 -0400
commit7acd57070649da4ac3923f1d2075c084d83da1f4 (patch)
tree031fa0e0153d1ff83dee355e94896326d8f16fec /drivers/target
parent9f3eb93eaf5bd49051458fcb098af3fcf111d3d0 (diff)
target: Do not special-case loop and iscsi fabric module loads
These modules, along with other fabrics, should be loaded as-needed by the LIO userspace tools. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_configfs.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
index 801efa892046..37c4bf3be43a 100644
--- a/drivers/target/target_core_configfs.c
+++ b/drivers/target/target_core_configfs.c
@@ -122,47 +122,9 @@ static struct config_group *target_core_register_fabric(
122 const char *name) 122 const char *name)
123{ 123{
124 struct target_fabric_configfs *tf; 124 struct target_fabric_configfs *tf;
125 int ret;
126 125
127 pr_debug("Target_Core_ConfigFS: REGISTER -> group: %p name:" 126 pr_debug("Target_Core_ConfigFS: REGISTER -> group: %p name:"
128 " %s\n", group, name); 127 " %s\n", group, name);
129 /*
130 * Below are some hardcoded request_module() calls to automatically
131 * local fabric modules when the following is called:
132 *
133 * mkdir -p /sys/kernel/config/target/$MODULE_NAME
134 *
135 * Note that this does not limit which TCM fabric module can be
136 * registered, but simply provids auto loading logic for modules with
137 * mkdir(2) system calls with known TCM fabric modules.
138 */
139 if (!strncmp(name, "iscsi", 5)) {
140 /*
141 * Automatically load the LIO Target fabric module when the
142 * following is called:
143 *
144 * mkdir -p $CONFIGFS/target/iscsi
145 */
146 ret = request_module("iscsi_target_mod");
147 if (ret < 0) {
148 pr_err("request_module() failed for"
149 " iscsi_target_mod.ko: %d\n", ret);
150 return ERR_PTR(-EINVAL);
151 }
152 } else if (!strncmp(name, "loopback", 8)) {
153 /*
154 * Automatically load the tcm_loop fabric module when the
155 * following is called:
156 *
157 * mkdir -p $CONFIGFS/target/loopback
158 */
159 ret = request_module("tcm_loop");
160 if (ret < 0) {
161 pr_err("request_module() failed for"
162 " tcm_loop.ko: %d\n", ret);
163 return ERR_PTR(-EINVAL);
164 }
165 }
166 128
167 tf = target_core_get_fabric(name); 129 tf = target_core_get_fabric(name);
168 if (!tf) { 130 if (!tf) {