aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/dm-io.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c
index 8f25f628ef16..c56c7eb86fe2 100644
--- a/drivers/md/dm-io.c
+++ b/drivers/md/dm-io.c
@@ -20,7 +20,7 @@ struct dm_io_client {
20 20
21/* FIXME: can we shrink this ? */ 21/* FIXME: can we shrink this ? */
22struct io { 22struct io {
23 unsigned long error; 23 unsigned long error_bits;
24 atomic_t count; 24 atomic_t count;
25 struct task_struct *sleeper; 25 struct task_struct *sleeper;
26 struct dm_io_client *client; 26 struct dm_io_client *client;
@@ -107,14 +107,14 @@ static inline unsigned bio_get_region(struct bio *bio)
107static void dec_count(struct io *io, unsigned int region, int error) 107static void dec_count(struct io *io, unsigned int region, int error)
108{ 108{
109 if (error) 109 if (error)
110 set_bit(region, &io->error); 110 set_bit(region, &io->error_bits);
111 111
112 if (atomic_dec_and_test(&io->count)) { 112 if (atomic_dec_and_test(&io->count)) {
113 if (io->sleeper) 113 if (io->sleeper)
114 wake_up_process(io->sleeper); 114 wake_up_process(io->sleeper);
115 115
116 else { 116 else {
117 unsigned long r = io->error; 117 unsigned long r = io->error_bits;
118 io_notify_fn fn = io->callback; 118 io_notify_fn fn = io->callback;
119 void *context = io->context; 119 void *context = io->context;
120 120
@@ -357,7 +357,7 @@ static int sync_io(struct dm_io_client *client, unsigned int num_regions,
357 return -EIO; 357 return -EIO;
358 } 358 }
359 359
360 io.error = 0; 360 io.error_bits = 0;
361 atomic_set(&io.count, 1); /* see dispatch_io() */ 361 atomic_set(&io.count, 1); /* see dispatch_io() */
362 io.sleeper = current; 362 io.sleeper = current;
363 io.client = client; 363 io.client = client;
@@ -378,9 +378,9 @@ static int sync_io(struct dm_io_client *client, unsigned int num_regions,
378 return -EINTR; 378 return -EINTR;
379 379
380 if (error_bits) 380 if (error_bits)
381 *error_bits = io.error; 381 *error_bits = io.error_bits;
382 382
383 return io.error ? -EIO : 0; 383 return io.error_bits ? -EIO : 0;
384} 384}
385 385
386static int async_io(struct dm_io_client *client, unsigned int num_regions, 386static int async_io(struct dm_io_client *client, unsigned int num_regions,
@@ -396,7 +396,7 @@ static int async_io(struct dm_io_client *client, unsigned int num_regions,
396 } 396 }
397 397
398 io = mempool_alloc(client->pool, GFP_NOIO); 398 io = mempool_alloc(client->pool, GFP_NOIO);
399 io->error = 0; 399 io->error_bits = 0;
400 atomic_set(&io->count, 1); /* see dispatch_io() */ 400 atomic_set(&io->count, 1); /* see dispatch_io() */
401 io->sleeper = NULL; 401 io->sleeper = NULL;
402 io->client = client; 402 io->client = client;