From: Nicholas Bellinger Date: Thu, 22 Aug 2013 02:34:43 +0000 (-0700) Subject: target: Release COMPARE_AND_WRITE mutex in generic failure path X-Git-Tag: v3.12-rc1~23^2~22 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf6d1f0964fa9db57fc660caf51939d7a03359a1;p=pandora-kernel.git target: Release COMPARE_AND_WRITE mutex in generic failure path This patch adds a extra check for SCF_COMPARE_AND_WRITE within transport_generic_request_failure() to invoke the callback for compare_and_write_callback() or compare_and_write_done(), in order to release se_dev->caw_mutex from the generic failure path. It also adds to checks within compare_and_write_callback() to avoid processing when transport_generic_request_failure() occurs early enough that cmd->t_data_sg or cmd->t_bidi_data_sg have not been setup yet, nor se_dev->caw_mutex obtained from within sbc_compare_and_write(). v4 changes: - Add explicit check for cmd->transport_complete_callback in transport_generic_request_failure() to handle case where sbc_compare_and_write()clears callback pointer (Dan Carpenter) Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Martin Petersen Cc: Chris Mason Cc: James Bottomley Cc: Nicholas Bellinger Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed