This is a note to let you know that I've just added the patch titled

    rbd: protect read of snapshot sequence number

to the 3.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:
     0034-rbd-protect-read-of-snapshot-sequence-number.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From ef2cfb917fb296102bf9c2f9cfbf83cfcb370000 Mon Sep 17 00:00:00 2001
From: Josh Durgin <[email protected]>
Date: Mon, 5 Dec 2011 10:47:13 -0800
Subject: rbd: protect read of snapshot sequence number

From: Josh Durgin <[email protected]>

(cherry picked from commit 403f24d3d51760a8b9368d595fa5f48c309f1a0f)

This is updated whenever a snapshot is added or deleted, and the
snapc pointer is changed with every refresh of the header.

Signed-off-by: Josh Durgin <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
Reviewed-by: Yehuda Sadeh <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 drivers/block/rbd.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -1683,7 +1683,9 @@ static int rbd_header_add_snap(struct rb
        if (ret < 0)
                return ret;
 
-       dev->header.snapc->seq =  new_snapid;
+       down_write(&dev->header_rwsem);
+       dev->header.snapc->seq = new_snapid;
+       up_write(&dev->header_rwsem);
 
        return 0;
 bad:


Patches currently in stable-queue which might be from [email protected] 
are

queue-3.4/0034-rbd-protect-read-of-snapshot-sequence-number.patch
queue-3.4/0035-rbd-store-snapshot-id-instead-of-index.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

Reply via email to