dm io: simplify dec_count and sync_io
authorJoe Thornber <ejt@redhat.com>
Mon, 30 Jun 2014 17:26:30 +0000 (13:26 -0400)
committerMike Snitzer <snitzer@redhat.com>
Tue, 15 Jul 2014 18:09:04 +0000 (14:09 -0400)
commitc8d74431c540c5ee13d09652201ee280a32cb648
treecd7c94b8346b9b610fc4a897c9d2d5894a71254c
parent048e5a07f282c57815b3901d4a68a77fa131ce0a
dm io: simplify dec_count and sync_io

Remove the io struct off the stack in sync_io() and allocate it from
the mempool like is done in async_io().

dec_count() now always calls a callback function and always frees the io
struct back to the mempool (so sync_io and async_io share this pattern).

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-io.c