Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 377303
b: refs/heads/master
c: 58bd0c6
h: refs/heads/master
i:
  377301: e5f57fe
  377299: cb151dd
  377295: 16abb86
v: v3
  • Loading branch information
Andy Grover authored and Nicholas Bellinger committed Jun 20, 2013
1 parent 61384cc commit 6433345
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b5aff3d2747bea08b386edd070941a45611ffe51
refs/heads/master: 58bd0c69ffa27ea2309959836811e88004d73720
25 changes: 14 additions & 11 deletions trunk/drivers/target/iscsi/iscsi_target_configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static ssize_t lio_target_np_store_iser(
struct iscsi_tpg_np *tpg_np_iser = NULL;
char *endptr;
u32 op;
int rc;
int rc = 0;

op = simple_strtoul(page, &endptr, 0);
if ((op != 1) && (op != 0)) {
Expand All @@ -174,22 +174,25 @@ static ssize_t lio_target_np_store_iser(
return -EINVAL;

if (op) {
int rc = request_module("ib_isert");
if (rc != 0)
rc = request_module("ib_isert");
if (rc != 0) {
pr_warn("Unable to request_module for ib_isert\n");
rc = 0;
}

tpg_np_iser = iscsit_tpg_add_network_portal(tpg, &np->np_sockaddr,
np->np_ip, tpg_np, ISCSI_INFINIBAND);
if (!tpg_np_iser || IS_ERR(tpg_np_iser))
if (IS_ERR(tpg_np_iser)) {
rc = PTR_ERR(tpg_np_iser);
goto out;
}
} else {
tpg_np_iser = iscsit_tpg_locate_child_np(tpg_np, ISCSI_INFINIBAND);
if (!tpg_np_iser)
goto out;

rc = iscsit_tpg_del_network_portal(tpg, tpg_np_iser);
if (rc < 0)
goto out;
if (tpg_np_iser) {
rc = iscsit_tpg_del_network_portal(tpg, tpg_np_iser);
if (rc < 0)
goto out;
}
}

printk("lio_target_np_store_iser() done, op: %d\n", op);
Expand All @@ -198,7 +201,7 @@ static ssize_t lio_target_np_store_iser(
return count;
out:
iscsit_put_tpg(tpg);
return -EINVAL;
return rc;
}

TF_NP_BASE_ATTR(lio_target, iser, S_IRUGO | S_IWUSR);
Expand Down

0 comments on commit 6433345

Please sign in to comment.