projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
035fe03
)
Btrfs: fix race between allocate and release extent buffer.
author
Yan, Zheng
<zheng.yan@oracle.com>
Thu, 4 Feb 2010 08:46:56 +0000
(08:46 +0000)
committer
Chris Mason
<chris.mason@oracle.com>
Thu, 4 Feb 2010 16:31:44 +0000
(11:31 -0500)
Increase extent buffer's reference count while holding the lock.
Otherwise it can race with try_release_extent_buffer.
Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/extent_io.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/extent_io.c
b/fs/btrfs/extent_io.c
index 96577e8bf9fdb62819ab2dbd5f9da91200624596..b177ed3196126d9fe8e5d0f1507075a421e535b9 100644
(file)
--- a/
fs/btrfs/extent_io.c
+++ b/
fs/btrfs/extent_io.c
@@
-3165,10
+3165,9
@@
struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree,
spin_unlock(&tree->buffer_lock);
goto free_eb;
}
- spin_unlock(&tree->buffer_lock);
-
/* add one reference for the tree */
atomic_inc(&eb->refs);
+ spin_unlock(&tree->buffer_lock);
return eb;
free_eb: