summaryrefslogtreecommitdiff
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2016-08-30 16:11:53 -0400
committerMike Snitzer <snitzer@redhat.com>2016-08-30 16:16:49 -0400
commita5d60783df61fbb67b7596b8a0f6b4b2e05251d5 (patch)
treef7b3d3e7501084c2228997f074b3978a81918bab /drivers/md/raid1.c
parent3eab887a55424fc2c27553b7bfe32330df83f7b8 (diff)
downloadlinux-a5d60783df61fbb67b7596b8a0f6b4b2e05251d5.tar.gz
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
Diffstat (limited to 'drivers/md/raid1.c')
0 files changed, 0 insertions, 0 deletions