[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [dm-devel] [PATCH] dm-crypt: add missing error handling



On 01/24/2012 03:32 AM, Mikulas Patocka wrote:
dm-crypt: add missing error handling

There were cases where error code would be used only if we finish processing
the last sector. If there were other encryption operations in flight, error
would be ignored and bio would be returned with success as if no error
happened.

+static void kcryptd_crypt_write_io_submit(struct dm_crypt_io *io, int async)
  {
  	struct bio *clone = io->ctx.bio_out;
  	struct crypt_config *cc = io->target->private;

-	if (unlikely(error<  0)) {
+	if (unlikely(io->error<  0)) {

Remove unlikely()... it is removed elsewhere below in this patch and it really
makes no much sense here.

Reviewed-by: Milan Broz <mbroz redhat com>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]