iser-target: Move INIT_WORK setup into isert_create_device_ib_res
authorNicholas Bellinger <nab@linux-iscsi.org>
Thu, 12 Dec 2013 00:20:13 +0000 (16:20 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2014 20:25:09 +0000 (12:25 -0800)
commita7a50a853cbba22cafec1e1c618ccf9919986fca
tree5046c98bc05addfedafc4da83c8ea6dfee186b1b
parentf0c626f9e435d788e9b8950be22a0b801ec5e5ba
iser-target: Move INIT_WORK setup into isert_create_device_ib_res

commit 2853c2b6671509591be09213954d7249ca6ff224 upstream.

This patch moves INIT_WORK setup for cq_desc->cq_[rx,tx]_work into
isert_create_device_ib_res(), instead of being done each callback
invocation in isert_cq_[rx,tx]_callback().

This also fixes a 'INFO: trying to register non-static key' warning
when cancel_work_sync() is called before INIT_WORK has setup the
struct work_struct.

Reported-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/ulp/isert/ib_isert.c