diff options
author | Chris Mason <chris.mason@fusionio.com> | 2013-01-21 20:26:55 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-01-21 20:26:55 -0500 |
commit | daf2c08911522d1739c55baf35f03531a29c87ef (patch) | |
tree | 380d89b955baebd90ca5ac1cf6527f963cf7dae7 /fs/btrfs/extent-tree.c | |
parent | 2cf687039676c2b6e1ee96b0b89090aca94babcd (diff) | |
parent | 3972f2603d8570effaf633cea52b12c7c2773c11 (diff) | |
download | talos-op-linux-daf2c08911522d1739c55baf35f03531a29c87ef.tar.gz talos-op-linux-daf2c08911522d1739c55baf35f03531a29c87ef.zip |
Merge branch 'for-chris' of git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next into linus
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index d133edfcd449..85b8454d9608 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -3997,7 +3997,7 @@ again: * We make the other tasks wait for the flush only when we can flush * all things. */ - if (ret && flush == BTRFS_RESERVE_FLUSH_ALL) { + if (ret && flush != BTRFS_RESERVE_NO_FLUSH) { flushing = true; space_info->flush = 1; } @@ -5560,7 +5560,7 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, int empty_cluster = 2 * 1024 * 1024; struct btrfs_space_info *space_info; int loop = 0; - int index = 0; + int index = __get_raid_index(data); int alloc_type = (data & BTRFS_BLOCK_GROUP_DATA) ? RESERVE_ALLOC_NO_ACCOUNT : RESERVE_ALLOC; bool found_uncached_bg = false; @@ -6788,11 +6788,13 @@ static noinline int walk_up_proc(struct btrfs_trans_handle *trans, &wc->flags[level]); if (ret < 0) { btrfs_tree_unlock_rw(eb, path->locks[level]); + path->locks[level] = 0; return ret; } BUG_ON(wc->refs[level] == 0); if (wc->refs[level] == 1) { btrfs_tree_unlock_rw(eb, path->locks[level]); + path->locks[level] = 0; return 1; } } |