aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index b0f2241274fd..1121d518bf8c 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -798,9 +798,12 @@ static int noinline insert_extents(struct btrfs_trans_handle *trans,
798 */ 798 */
799 i = last; 799 i = last;
800 last = 0; 800 last = 0;
801 cur = insert_list->next;
802 op = list_entry(cur, struct pending_extent_op, list);
803 total--; 801 total--;
802 if (i < total) {
803 cur = insert_list->next;
804 op = list_entry(cur, struct pending_extent_op,
805 list);
806 }
804 } else { 807 } else {
805 i += ret; 808 i += ret;
806 } 809 }
@@ -2150,6 +2153,7 @@ again:
2150 if (ret) { 2153 if (ret) {
2151 if (skipped && all && !num_inserts) { 2154 if (skipped && all && !num_inserts) {
2152 skipped = 0; 2155 skipped = 0;
2156 search = 0;
2153 continue; 2157 continue;
2154 } 2158 }
2155 mutex_unlock(&info->extent_ins_mutex); 2159 mutex_unlock(&info->extent_ins_mutex);
@@ -2189,7 +2193,7 @@ again:
2189 } 2193 }
2190 2194
2191 /* 2195 /*
2192 * process teh update list, clear the writeback bit for it, and if 2196 * process the update list, clear the writeback bit for it, and if
2193 * somebody marked this thing for deletion then just unlock it and be 2197 * somebody marked this thing for deletion then just unlock it and be
2194 * done, the free_extents will handle it 2198 * done, the free_extents will handle it
2195 */ 2199 */