* Patch "dm cache metadata: fix cmd_read_lock() acquiring write lock" has been added to the 4.4-stable tree
@ 2016-04-28 0:17 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-04-28 0:17 UTC (permalink / raw)
To: f.fallen45, gregkh, snitzer; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
dm cache metadata: fix cmd_read_lock() acquiring write lock
to the 4.4-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-cache-metadata-fix-cmd_read_lock-acquiring-write-lock.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 6545b60baaf880b0cd29a5e89dbe745a06027e89 Mon Sep 17 00:00:00 2001
From: Ahmed Samy <f.fallen45@gmail.com>
Date: Sun, 17 Apr 2016 05:37:09 +0000
Subject: dm cache metadata: fix cmd_read_lock() acquiring write lock
From: Ahmed Samy <f.fallen45@gmail.com>
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@gmail.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/dm-cache-metadata.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/md/dm-cache-metadata.c
+++ b/drivers/md/dm-cache-metadata.c
@@ -894,9 +894,9 @@ static bool cmd_write_lock(struct dm_cac
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;
Patches currently in stable-queue which might be from f.fallen45@gmail.com are
queue-4.4/dm-cache-metadata-fix-cmd_read_lock-acquiring-write-lock.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-04-28 0:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-28 0:17 Patch "dm cache metadata: fix cmd_read_lock() acquiring write lock" has been added to the 4.4-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).