* [Btrfs-devel][PATCH] Properly release lock in pin_down_bytes
@ 2008-07-10 19:20 Yan Zheng
0 siblings, 0 replies; only message in thread
From: Yan Zheng @ 2008-07-10 19:20 UTC (permalink / raw)
To: linux-btrfs
Hello,
When buffer isn't uptodate, pin_down_bytes may leave the tree locked
after it returns.
Regards
YZ
---
diff -r 3f0eee804974 extent-tree.c
--- a/extent-tree.c Thu Jun 26 10:34:20 2008 -0400
+++ b/extent-tree.c Fri Jul 11 03:20:00 2008 +0800
@@ -1441,8 +1441,8 @@ static int pin_down_bytes(struct btrfs_r
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 =
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-07-10 19:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-10 19:20 [Btrfs-devel][PATCH] Properly release lock in pin_down_bytes Yan Zheng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox