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

    Btrfs: remove ourselves from the cluster list under lock

to the 3.11-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:
     btrfs-remove-ourselves-from-the-cluster-list-under-lock.patch
and it can be found in the queue-3.11 subdirectory.

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


>From b8d0c69b9469ffd33df30fee3e990f2d4aa68a09 Mon Sep 17 00:00:00 2001
From: Josef Bacik <[email protected]>
Date: Thu, 22 Aug 2013 17:03:29 -0400
Subject: Btrfs: remove ourselves from the cluster list under lock

From: Josef Bacik <[email protected]>

commit b8d0c69b9469ffd33df30fee3e990f2d4aa68a09 upstream.

A user was reporting weird warnings from btrfs_put_delayed_ref() and I noticed
that we were doing this list_del_init() on our head ref outside of
delayed_refs->lock.  This is a problem if we have people still on the list, we
could end up modifying old pointers and such.  Fix this by removing us from the
list before we do our run_delayed_ref on our head ref.  Thanks,

Signed-off-by: Josef Bacik <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 fs/btrfs/extent-tree.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -2403,6 +2403,8 @@ static noinline int run_clustered_refs(s
                        default:
                                WARN_ON(1);
                        }
+               } else {
+                       list_del_init(&locked_ref->cluster);
                }
                spin_unlock(&delayed_refs->lock);
 
@@ -2425,7 +2427,6 @@ static noinline int run_clustered_refs(s
                 * list before we release it.
                 */
                if (btrfs_delayed_ref_is_head(ref)) {
-                       list_del_init(&locked_ref->cluster);
                        btrfs_delayed_ref_unlock(locked_ref);
                        locked_ref = NULL;
                }


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

queue-3.11/btrfs-remove-ourselves-from-the-cluster-list-under-lock.patch
queue-3.11/btrfs-skip-subvol-entries-when-checking-if-we-ve-created-a-dir-already.patch
queue-3.11/btrfs-reset-ret-in-record_one_backref.patch
queue-3.11/btrfs-change-how-we-queue-blocks-for-backref-checking.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