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

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

 



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@xxxxxxxxxx>

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel


[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux