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

    Btrfs: check for an extent_op on the locked ref

to the 3.14-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-check-for-an-extent_op-on-the-locked-ref.patch
and it can be found in the queue-3.14 subdirectory.

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


>From 573a075567f0174551e2fad2a3164afd2af788f2 Mon Sep 17 00:00:00 2001
From: Josef Bacik <[email protected]>
Date: Thu, 27 Mar 2014 19:41:34 -0400
Subject: Btrfs: check for an extent_op on the locked ref

From: Josef Bacik <[email protected]>

commit 573a075567f0174551e2fad2a3164afd2af788f2 upstream.

We could have possibly added an extent_op to the locked_ref while we dropped
locked_ref->lock, so check for this case as well and loop around.  Otherwise we
could lose flag updates which would lead to extent tree corruption.  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
@@ -2444,7 +2444,8 @@ static noinline int __btrfs_run_delayed_
                        spin_unlock(&locked_ref->lock);
                        spin_lock(&delayed_refs->lock);
                        spin_lock(&locked_ref->lock);
-                       if (rb_first(&locked_ref->ref_root)) {
+                       if (rb_first(&locked_ref->ref_root) ||
+                           locked_ref->extent_op) {
                                spin_unlock(&locked_ref->lock);
                                spin_unlock(&delayed_refs->lock);
                                continue;


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

queue-3.14/btrfs-skip-submitting-barrier-for-missing-device.patch
queue-3.14/btrfs-check-for-an-extent_op-on-the-locked-ref.patch
queue-3.14/btrfs-fix-deadlock-with-nested-trans-handles.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