[4.2.y-ckt stable] Patch "dm cache metadata: fix cmd_read_lock() acquiring write lock" has been added to the 4.2.y-ckt tree
Kamal Mostafa
kamal at canonical.com
Mon Apr 25 19:44:30 UTC 2016
This is a note to let you know that I have just added a patch titled
dm cache metadata: fix cmd_read_lock() acquiring write lock
to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-4.2.y-queue
This patch is scheduled to be released in version 4.2.8-ckt9.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 4.2.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
---8<------------------------------------------------------------
>From 80aa3ec3965a871ba07d8de329515f68887a244a Mon Sep 17 00:00:00 2001
From: Ahmed Samy <f.fallen45 at gmail.com>
Date: Sun, 17 Apr 2016 05:37:09 +0000
Subject: dm cache metadata: fix cmd_read_lock() acquiring write lock
commit 6545b60baaf880b0cd29a5e89dbe745a06027e89 upstream.
Commit 9567366fefdd ("dm cache metadata: fix READ_LOCK macros and
cleanup WRITE_LOCK macros") uses down_write() instead of down_read() in
cmd_read_lock(), yet up_read() is used to release the lock in
READ_UNLOCK(). Fix it.
Fixes: 9567366fefdd ("dm cache metadata: fix READ_LOCK macros and cleanup WRITE_LOCK macros")
Signed-off-by: Ahmed Samy <f.fallen45 at gmail.com>
Signed-off-by: Mike Snitzer <snitzer at redhat.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
drivers/md/dm-cache-metadata.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm-cache-metadata.c b/drivers/md/dm-cache-metadata.c
index 141b9bc..d00d5bb 100644
--- a/drivers/md/dm-cache-metadata.c
+++ b/drivers/md/dm-cache-metadata.c
@@ -890,9 +890,9 @@ static bool cmd_write_lock(struct dm_cache_metadata *cmd)
static bool cmd_read_lock(struct dm_cache_metadata *cmd)
{
- down_write(&cmd->root_lock);
+ down_read(&cmd->root_lock);
if (cmd->fail_io) {
- up_write(&cmd->root_lock);
+ up_read(&cmd->root_lock);
return false;
}
return true;
--
2.7.4
More information about the kernel-team
mailing list