提交 573a0755 编写于 作者: J Josef Bacik 提交者: Chris Mason

Btrfs: check for an extent_op on the locked ref

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,

cc: stable@vger.kernel.org
Signed-off-by: NJosef Bacik <jbacik@fb.com>
Signed-off-by: NChris Mason <clm@fb.com>
上级 ba8b0289
...@@ -2444,7 +2444,8 @@ static noinline int __btrfs_run_delayed_refs(struct btrfs_trans_handle *trans, ...@@ -2444,7 +2444,8 @@ static noinline int __btrfs_run_delayed_refs(struct btrfs_trans_handle *trans,
spin_unlock(&locked_ref->lock); spin_unlock(&locked_ref->lock);
spin_lock(&delayed_refs->lock); spin_lock(&delayed_refs->lock);
spin_lock(&locked_ref->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(&locked_ref->lock);
spin_unlock(&delayed_refs->lock); spin_unlock(&delayed_refs->lock);
continue; continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册