diff options
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 2b35f8d14bb9..49fd7b66d57b 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -2301,6 +2301,7 @@ static noinline int run_clustered_refs(struct btrfs_trans_handle *trans, | |||
2301 | 2301 | ||
2302 | if (ret) { | 2302 | if (ret) { |
2303 | printk(KERN_DEBUG "btrfs: run_delayed_extent_op returned %d\n", ret); | 2303 | printk(KERN_DEBUG "btrfs: run_delayed_extent_op returned %d\n", ret); |
2304 | spin_lock(&delayed_refs->lock); | ||
2304 | return ret; | 2305 | return ret; |
2305 | } | 2306 | } |
2306 | 2307 | ||
@@ -2331,6 +2332,7 @@ static noinline int run_clustered_refs(struct btrfs_trans_handle *trans, | |||
2331 | 2332 | ||
2332 | if (ret) { | 2333 | if (ret) { |
2333 | printk(KERN_DEBUG "btrfs: run_one_delayed_ref returned %d\n", ret); | 2334 | printk(KERN_DEBUG "btrfs: run_one_delayed_ref returned %d\n", ret); |
2335 | spin_lock(&delayed_refs->lock); | ||
2334 | return ret; | 2336 | return ret; |
2335 | } | 2337 | } |
2336 | 2338 | ||
@@ -3769,13 +3771,10 @@ again: | |||
3769 | */ | 3771 | */ |
3770 | if (current->journal_info) | 3772 | if (current->journal_info) |
3771 | return -EAGAIN; | 3773 | return -EAGAIN; |
3772 | ret = wait_event_interruptible(space_info->wait, | 3774 | ret = wait_event_killable(space_info->wait, !space_info->flush); |
3773 | !space_info->flush); | 3775 | /* Must have been killed, return */ |
3774 | /* Must have been interrupted, return */ | 3776 | if (ret) |
3775 | if (ret) { | ||
3776 | printk(KERN_DEBUG "btrfs: %s returning -EINTR\n", __func__); | ||
3777 | return -EINTR; | 3777 | return -EINTR; |
3778 | } | ||
3779 | 3778 | ||
3780 | spin_lock(&space_info->lock); | 3779 | spin_lock(&space_info->lock); |
3781 | } | 3780 | } |
@@ -4215,8 +4214,8 @@ static void update_global_block_rsv(struct btrfs_fs_info *fs_info) | |||
4215 | 4214 | ||
4216 | num_bytes = calc_global_metadata_size(fs_info); | 4215 | num_bytes = calc_global_metadata_size(fs_info); |
4217 | 4216 | ||
4218 | spin_lock(&block_rsv->lock); | ||
4219 | spin_lock(&sinfo->lock); | 4217 | spin_lock(&sinfo->lock); |
4218 | spin_lock(&block_rsv->lock); | ||
4220 | 4219 | ||
4221 | block_rsv->size = num_bytes; | 4220 | block_rsv->size = num_bytes; |
4222 | 4221 | ||
@@ -4242,8 +4241,8 @@ static void update_global_block_rsv(struct btrfs_fs_info *fs_info) | |||
4242 | block_rsv->full = 1; | 4241 | block_rsv->full = 1; |
4243 | } | 4242 | } |
4244 | 4243 | ||
4245 | spin_unlock(&sinfo->lock); | ||
4246 | spin_unlock(&block_rsv->lock); | 4244 | spin_unlock(&block_rsv->lock); |
4245 | spin_unlock(&sinfo->lock); | ||
4247 | } | 4246 | } |
4248 | 4247 | ||
4249 | static void init_global_block_rsv(struct btrfs_fs_info *fs_info) | 4248 | static void init_global_block_rsv(struct btrfs_fs_info *fs_info) |
@@ -6569,7 +6568,7 @@ static noinline int do_walk_down(struct btrfs_trans_handle *trans, | |||
6569 | goto skip; | 6568 | goto skip; |
6570 | } | 6569 | } |
6571 | 6570 | ||
6572 | if (!btrfs_buffer_uptodate(next, generation)) { | 6571 | if (!btrfs_buffer_uptodate(next, generation, 0)) { |
6573 | btrfs_tree_unlock(next); | 6572 | btrfs_tree_unlock(next); |
6574 | free_extent_buffer(next); | 6573 | free_extent_buffer(next); |
6575 | next = NULL; | 6574 | next = NULL; |