Mikulas Patocka a5d60783df dm log writes: move IO accounting earlier to fix error path
Move log_one_block()'s atomic_inc(&lc->io_blocks) before bio_alloc() to
fix a bug that the target hangs if bio_alloc() fails.  The error path
does put_io_block(lc), so atomic_inc(&lc->io_blocks) must occur before
invoking the error path to avoid underflow of lc->io_blocks.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Josef Bacik <jbacik@fb,com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
2016-08-30 16:16:49 -04:00
..
2016-06-07 13:41:38 -06:00
2016-06-07 13:41:38 -06:00
2014-01-14 23:23:03 -05:00
2016-08-07 14:41:02 -06:00
2016-07-28 17:38:16 -07:00
2016-08-07 14:41:02 -06:00
2016-08-07 14:41:02 -06:00
2016-06-07 13:41:38 -06:00
2016-08-07 14:41:02 -06:00
2016-08-07 14:41:02 -06:00
2016-07-20 23:49:50 -04:00
2016-07-28 17:38:16 -07:00
2016-08-07 14:41:02 -06:00
2016-08-07 14:41:02 -06:00
2016-08-07 14:41:02 -06:00
2016-07-20 23:49:49 -04:00
2016-01-20 13:52:20 -08:00
2016-08-07 14:41:02 -06:00
2016-08-07 14:41:02 -06:00
2016-08-07 14:41:02 -06:00
2016-08-07 14:41:02 -06:00
2015-08-13 12:31:57 -06:00
2016-08-07 14:41:02 -06:00
2016-08-07 14:41:02 -06:00
2016-08-07 14:41:02 -06:00