projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Drop 'size' argument from bio_endio and bi_end_io
[deliverable/linux.git]
/
drivers
/
md
/
dm-crypt.c
diff --git
a/drivers/md/dm-crypt.c
b/drivers/md/dm-crypt.c
index bdc52d6922b7d998f27068cce53ededb302f0b09..8216a6f75be57fcd234e50a21b3491c6054d9a80 100644
(file)
--- a/
drivers/md/dm-crypt.c
+++ b/
drivers/md/dm-crypt.c
@@
-489,7
+489,7
@@
static void dec_pending(struct dm_crypt_io *io, int error)
if (!atomic_dec_and_test(&io->pending))
return;
if (!atomic_dec_and_test(&io->pending))
return;
- bio_endio(io->base_bio, io->
base_bio->bi_size, io->
error);
+ bio_endio(io->base_bio, io->error);
mempool_free(io, cc->io_pool);
}
mempool_free(io, cc->io_pool);
}
@@
-509,25
+509,19
@@
static void kcryptd_queue_io(struct dm_crypt_io *io)
queue_work(_kcryptd_workqueue, &io->work);
}
queue_work(_kcryptd_workqueue, &io->work);
}
-static
int crypt_endio(struct bio *clone, unsigned int d
one, int error)
+static
void crypt_endio(struct bio *cl
one, int error)
{
struct dm_crypt_io *io = clone->bi_private;
struct crypt_config *cc = io->target->private;
unsigned read_io = bio_data_dir(clone) == READ;
/*
{
struct dm_crypt_io *io = clone->bi_private;
struct crypt_config *cc = io->target->private;
unsigned read_io = bio_data_dir(clone) == READ;
/*
- * free the processed pages, even if
- * it's only a partially completed write
+ * free the processed pages
*/
*/
- if (!read_io)
- crypt_free_buffer_pages(cc, clone, done);
-
- /* keep going - not finished yet */
- if (unlikely(clone->bi_size))
- return 1;
-
- if (!read_io)
+ if (!read_io) {
+ crypt_free_buffer_pages(cc, clone, clone->bi_size);
goto out;
goto out;
+ }
if (unlikely(!bio_flagged(clone, BIO_UPTODATE))) {
error = -EIO;
if (unlikely(!bio_flagged(clone, BIO_UPTODATE))) {
error = -EIO;
@@
-537,12
+531,11
@@
static int crypt_endio(struct bio *clone, unsigned int done, int error)
bio_put(clone);
io->post_process = 1;
kcryptd_queue_io(io);
bio_put(clone);
io->post_process = 1;
kcryptd_queue_io(io);
- return
0
;
+ return;
out:
bio_put(clone);
dec_pending(io, error);
out:
bio_put(clone);
dec_pending(io, error);
- return error;
}
static void clone_init(struct dm_crypt_io *io, struct bio *clone)
}
static void clone_init(struct dm_crypt_io *io, struct bio *clone)
This page took
0.027908 seconds
and
5
git commands to generate.