diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2009-06-22 10:12:17 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2009-06-22 10:12:17 +0100 |
commit | 531fe96364f30879753d46c1f52ab839e12d2e5d (patch) | |
tree | 61a625f68c3105c1525e2eebba0f046a3678eb37 /drivers/md | |
parent | 32a926da5a16c01a8213331e5764472ce2f14a8d (diff) | |
download | blackbird-op-linux-531fe96364f30879753d46c1f52ab839e12d2e5d.tar.gz blackbird-op-linux-531fe96364f30879753d46c1f52ab839e12d2e5d.zip |
dm: make dm_flush return void
Make dm_flush return void.
The first error during flush is stored in md->barrier_error instead.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 5e06f1e6234f..e34d694ddd04 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -1439,34 +1439,25 @@ static int dm_wait_for_completion(struct mapped_device *md, int interruptible) return r; } -static int dm_flush(struct mapped_device *md) +static void dm_flush(struct mapped_device *md) { dm_wait_for_completion(md, TASK_UNINTERRUPTIBLE); - return 0; } static void process_barrier(struct mapped_device *md, struct bio *bio) { - int error = dm_flush(md); + dm_flush(md); - if (unlikely(error)) { - bio_endio(bio, error); - return; - } if (bio_empty_barrier(bio)) { bio_endio(bio, 0); return; } __split_and_process_bio(md, bio); - - error = dm_flush(md); - - if (!error && md->barrier_error) - error = md->barrier_error; + dm_flush(md); if (md->barrier_error != DM_ENDIO_REQUEUE) - bio_endio(bio, error); + bio_endio(bio, md->barrier_error); } /* |