target: Add transport_cmd_check_stop write_pending bit
target: Add transport_cmd_check_stop write_pending bit

This patch adds a new transport_cmd_check_stop() parameter for signaling
when TRANSPORT_WRITE_PENDING needs to be set.

This allows transport_generic_new_cmd() to avoid the extra lock acquire/release
of ->t_state_lock in the fast path for DMA_TO_DEVICE operations ahead of
transport_cmd_check_stop() + se_tfo->write_pending().

Cc: Christoph Hellwig <923f7720577207a44b32e59bbfbea59d27f1ae8e@lst.de>
Cc: Roland Dreier <0d270388f2f92757a5de0f4bd891d3b392c44c4f@kernel.org>
Cc: Kent Overstreet <8f464ad20d7f95b5ede78c4772dc4f5cc3ffa553@google.com>
Cc: Or Gerlitz <de1b678a59344538ef9f2ddb34a5f9486544e2f9@mellanox.com>
Cc: Moussa Ba <fe6fc3fd7882fb1ebf780ab5561e5c7c79b28945@micron.com>
Signed-off-by: Nicholas Bellinger <978acd1567d5598152161fdf8bf3ca568f950c9b@linux-iscsi.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs