projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4546726
)
Btrfs: Properly release lock in pin_down_bytes
author
Yan
<yanzheng@21cn.com>
Thu, 24 Jul 2008 16:18:16 +0000
(12:18 -0400)
committer
Chris Mason
<chris.mason@oracle.com>
Thu, 25 Sep 2008 15:04:05 +0000
(11:04 -0400)
When buffer isn't uptodate, pin_down_bytes may leave the tree locked
after it returns.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/extent-tree.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/extent-tree.c
b/fs/btrfs/extent-tree.c
index e6a3ba9dd1079f595987212a23cf20c87845a735..cdfb4ff4b459d7c2db0dcc6a8c92c4cf403c2442 100644
(file)
--- a/
fs/btrfs/extent-tree.c
+++ b/
fs/btrfs/extent-tree.c
@@
-1485,8
+1485,8
@@
static int pin_down_bytes(struct btrfs_root *root, u64 bytenr, u32 num_bytes,
struct extent_buffer *buf;
buf = btrfs_find_tree_block(root, bytenr, num_bytes);
if (buf) {
- if (btrfs_
try_tree_lock(buf
) &&
- btrfs_
buffer_uptodate(buf, 0
)) {
+ if (btrfs_
buffer_uptodate(buf, 0
) &&
+ btrfs_
try_tree_lock(buf
)) {
u64 transid =
root->fs_info->running_transaction->transid;
u64 header_transid =