[SCSI] iscsi_tcp: fix xmittask oops
authorMike Christie <michaelc@cs.wisc.edu>
Wed, 8 Nov 2006 21:58:33 +0000 (15:58 -0600)
committerJames Bottomley <jejb@mulgrave.(none)>
Fri, 10 Nov 2006 00:41:48 +0000 (09:41 +0900)
commitdb37c505e5dfc1a26d6c82f1ce0c3ae06641c3e0
treef2c74d03a43cc6b5c5949ecd838502ab9c770048
parentd6e24d1c8a197cc9c2a1568224474f4b7af50803
[SCSI] iscsi_tcp: fix xmittask oops

XMSTATE_SOL_HDR could be set when the xmit thread tests it, but there may
not be anything on the r2tqueue yet. Move the XMSTATE_SOL_HDR set
before the addition to the queue to make sure that when we pull something
off it it is valid. This does not add locks around the xmstate test or make
that a atmoic_t because this is a fast path and if it is set when we test it
we can handle it there without the overhead. Later on we check the xmitqueue
for all requests with the session lock so we will not miss it.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/iscsi_tcp.c