OSDN Git Service

md: dm-req-crypt: fixed error propagation when ICE is used
authorAndrey Markovytch <andreym@codeaurora.org>
Wed, 29 Jun 2016 09:27:24 +0000 (12:27 +0300)
committerKyle Yan <kyan@codeaurora.org>
Thu, 30 Jun 2016 22:11:03 +0000 (15:11 -0700)
When ICE is used and there was an error during endio, the error was
not propagated properly to upper layers, fixed.

Change-Id: I5c428e4a02f7012f95e3a32486920e69b93ea3fc
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
drivers/md/dm-req-crypt.c

index dd3e9d9..b2769a2 100644 (file)
@@ -873,6 +873,7 @@ static int req_crypt_endio(struct dm_target *ti, struct request *clone,
        /* If it is for ICE, free up req_io and return */
        if (encryption_mode == DM_REQ_CRYPT_ENCRYPTION_MODE_TRANSPARENT) {
                mempool_free(req_io, req_io_pool);
+               err = error;
                goto submit_request;
        }