aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2014-01-19 22:36:44 -0500
committerNicholas Bellinger <nab@linux-iscsi.org>2014-01-25 01:58:52 -0500
commit676687c69697d2081d25afd14ee90937d1fb0c8e (patch)
tree208da09393318112eee6146aecbd883e86e0dd0d /drivers/infiniband
parent555b270e25b0279b98083518a85f4b1da144a181 (diff)
iscsi-target: Convert gfp_t parameter to task state bitmask
This patch propigates the use of task state bitmask now used by percpu_ida_alloc() up the iscsi-target callchain, replacing the use of GFP_ATOMIC for TASK_RUNNING, and GFP_KERNEL for TASK_INTERRUPTIBLE. Also, drop the unnecessary gfp_t parameter to isert_allocate_cmd(), and just pass TASK_INTERRUPTIBLE into iscsit_allocate_cmd(). Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/isert/ib_isert.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index 421182be6e3f..63bcf69e9fe2 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -1028,13 +1028,13 @@ isert_rx_login_req(struct iser_rx_desc *rx_desc, int rx_buflen,
1028} 1028}
1029 1029
1030static struct iscsi_cmd 1030static struct iscsi_cmd
1031*isert_allocate_cmd(struct iscsi_conn *conn, gfp_t gfp) 1031*isert_allocate_cmd(struct iscsi_conn *conn)
1032{ 1032{
1033 struct isert_conn *isert_conn = (struct isert_conn *)conn->context; 1033 struct isert_conn *isert_conn = (struct isert_conn *)conn->context;
1034 struct isert_cmd *isert_cmd; 1034 struct isert_cmd *isert_cmd;
1035 struct iscsi_cmd *cmd; 1035 struct iscsi_cmd *cmd;
1036 1036
1037 cmd = iscsit_allocate_cmd(conn, gfp); 1037 cmd = iscsit_allocate_cmd(conn, TASK_INTERRUPTIBLE);
1038 if (!cmd) { 1038 if (!cmd) {
1039 pr_err("Unable to allocate iscsi_cmd + isert_cmd\n"); 1039 pr_err("Unable to allocate iscsi_cmd + isert_cmd\n");
1040 return NULL; 1040 return NULL;
@@ -1223,7 +1223,7 @@ isert_rx_opcode(struct isert_conn *isert_conn, struct iser_rx_desc *rx_desc,
1223 1223
1224 switch (opcode) { 1224 switch (opcode) {
1225 case ISCSI_OP_SCSI_CMD: 1225 case ISCSI_OP_SCSI_CMD:
1226 cmd = isert_allocate_cmd(conn, GFP_KERNEL); 1226 cmd = isert_allocate_cmd(conn);
1227 if (!cmd) 1227 if (!cmd)
1228 break; 1228 break;
1229 1229
@@ -1237,7 +1237,7 @@ isert_rx_opcode(struct isert_conn *isert_conn, struct iser_rx_desc *rx_desc,
1237 rx_desc, (unsigned char *)hdr); 1237 rx_desc, (unsigned char *)hdr);
1238 break; 1238 break;
1239 case ISCSI_OP_NOOP_OUT: 1239 case ISCSI_OP_NOOP_OUT:
1240 cmd = isert_allocate_cmd(conn, GFP_KERNEL); 1240 cmd = isert_allocate_cmd(conn);
1241 if (!cmd) 1241 if (!cmd)
1242 break; 1242 break;
1243 1243
@@ -1250,7 +1250,7 @@ isert_rx_opcode(struct isert_conn *isert_conn, struct iser_rx_desc *rx_desc,
1250 (unsigned char *)hdr); 1250 (unsigned char *)hdr);
1251 break; 1251 break;
1252 case ISCSI_OP_SCSI_TMFUNC: 1252 case ISCSI_OP_SCSI_TMFUNC:
1253 cmd = isert_allocate_cmd(conn, GFP_KERNEL); 1253 cmd = isert_allocate_cmd(conn);
1254 if (!cmd) 1254 if (!cmd)
1255 break; 1255 break;
1256 1256
@@ -1258,7 +1258,7 @@ isert_rx_opcode(struct isert_conn *isert_conn, struct iser_rx_desc *rx_desc,
1258 (unsigned char *)hdr); 1258 (unsigned char *)hdr);
1259 break; 1259 break;
1260 case ISCSI_OP_LOGOUT: 1260 case ISCSI_OP_LOGOUT:
1261 cmd = isert_allocate_cmd(conn, GFP_KERNEL); 1261 cmd = isert_allocate_cmd(conn);
1262 if (!cmd) 1262 if (!cmd)
1263 break; 1263 break;
1264 1264
@@ -1269,7 +1269,7 @@ isert_rx_opcode(struct isert_conn *isert_conn, struct iser_rx_desc *rx_desc,
1269 HZ); 1269 HZ);
1270 break; 1270 break;
1271 case ISCSI_OP_TEXT: 1271 case ISCSI_OP_TEXT:
1272 cmd = isert_allocate_cmd(conn, GFP_KERNEL); 1272 cmd = isert_allocate_cmd(conn);
1273 if (!cmd) 1273 if (!cmd)
1274 break; 1274 break;
1275 1275