This is a note to let you know that I've just added the patch titled
dm: fix missed error code if .end_io isn't implemented by target_type
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
dm-fix-missed-error-code-if-.end_io-isn-t-implemented-by-target_type.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 5164bece1673cdf04782f8ed3fba70743700f5da Mon Sep 17 00:00:00 2001
From: zhendong chen <[email protected]>
Date: Wed, 17 Dec 2014 14:37:04 +0800
Subject: dm: fix missed error code if .end_io isn't implemented by target_type
From: zhendong chen <[email protected]>
commit 5164bece1673cdf04782f8ed3fba70743700f5da upstream.
In bio-based DM's clone_endio(), when target_type doesn't implement
.end_io (e.g. linear) r will be always be initialized 0. So if a
WRITE SAME bio fails WRITE SAME will not be disabled as intended.
Fix this by initializing r to error, rather than 0, in clone_endio().
Signed-off-by: Alex Chen <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
Fixes: 7eee4ae2db ("dm: disable WRITE SAME if it fails")
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/md/dm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -899,7 +899,7 @@ static void disable_write_same(struct ma
static void clone_endio(struct bio *bio, int error)
{
- int r = 0;
+ int r = error;
struct dm_target_io *tio = container_of(bio, struct dm_target_io,
clone);
struct dm_io *io = tio->io;
struct mapped_device *md = tio->io->md;
Patches currently in stable-queue which might be from [email protected] are
queue-3.18/dm-fix-missed-error-code-if-.end_io-isn-t-implemented-by-target_type.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html