zhendong chen 5164bece16 dm: fix missed error code if .end_io isn't implemented by target_type
In bio-based DM's clone_endio(), when target_type doesn't implement
.end_io (e.g. linear) r will be always be initialized 0.  So if a
WRITE SAME bio fails WRITE SAME will not be disabled as intended.

Fix this by initializing r to error, rather than 0, in clone_endio().

Signed-off-by: Alex Chen <alex.chen@huawei.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Fixes: 7eee4ae2db ("dm: disable WRITE SAME if it fails")
Cc: stable@vger.kernel.org
2014-12-17 12:31:13 -05:00
..
2014-01-14 23:23:03 -05:00
2013-11-23 22:33:47 -08:00
2014-08-01 12:30:30 -04:00
2013-08-23 09:02:13 -04:00
2013-11-23 22:33:47 -08:00
2012-07-30 17:25:16 -07:00
2013-09-05 20:46:06 -04:00
2014-01-14 23:23:04 -05:00
2007-10-20 02:01:26 +01:00
2013-11-23 22:33:47 -08:00
2014-03-27 16:56:23 -04:00
2014-03-27 16:56:23 -04:00
2014-12-14 12:13:05 -08:00
2014-10-14 13:08:29 +11:00