diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-01-20 03:36:44 +0000 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-01-25 06:58:52 +0000 |
commit | 676687c69697d2081d25afd14ee90937d1fb0c8e (patch) | |
tree | 208da09393318112eee6146aecbd883e86e0dd0d /drivers/target/iscsi/iscsi_target_util.c | |
parent | 555b270e25b0279b98083518a85f4b1da144a181 (diff) | |
download | op-kernel-dev-676687c69697d2081d25afd14ee90937d1fb0c8e.zip op-kernel-dev-676687c69697d2081d25afd14ee90937d1fb0c8e.tar.gz |
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/target/iscsi/iscsi_target_util.c')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_util.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/target/iscsi/iscsi_target_util.c b/drivers/target/iscsi/iscsi_target_util.c index 5477eca..e655b04 100644 --- a/drivers/target/iscsi/iscsi_target_util.c +++ b/drivers/target/iscsi/iscsi_target_util.c @@ -152,12 +152,11 @@ void iscsit_free_r2ts_from_list(struct iscsi_cmd *cmd) * May be called from software interrupt (timer) context for allocating * iSCSI NopINs. */ -struct iscsi_cmd *iscsit_allocate_cmd(struct iscsi_conn *conn, gfp_t gfp_mask) +struct iscsi_cmd *iscsit_allocate_cmd(struct iscsi_conn *conn, int state) { struct iscsi_cmd *cmd; struct se_session *se_sess = conn->sess->se_sess; - int size, tag, state = (gfp_mask & __GFP_WAIT) ? TASK_INTERRUPTIBLE : - TASK_RUNNING; + int size, tag; tag = percpu_ida_alloc(&se_sess->sess_tag_pool, state); if (tag < 0) @@ -930,7 +929,7 @@ static int iscsit_add_nopin(struct iscsi_conn *conn, int want_response) u8 state; struct iscsi_cmd *cmd; - cmd = iscsit_allocate_cmd(conn, GFP_ATOMIC); + cmd = iscsit_allocate_cmd(conn, TASK_RUNNING); if (!cmd) return -1; |