Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310839
b: refs/heads/master
c: ed0eaa1
h: refs/heads/master
i:
  310837: a5197d4
  310835: fdbe050
  310831: d9ae608
v: v3
  • Loading branch information
Liu Bo authored and Chris Mason committed Jun 15, 2012
1 parent 5836072 commit 0c3939e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6e841e32b159e298debbb2cb0e9158e894fcaf05
refs/heads/master: ed0eaa14981e87a1e185b61e4ef621c440e3930c
11 changes: 11 additions & 0 deletions trunk/fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -3557,8 +3557,10 @@ static int btrfs_destroy_pinned_extent(struct btrfs_root *root,
u64 start;
u64 end;
int ret;
bool loop = true;

unpin = pinned_extents;
again:
while (1) {
ret = find_first_extent_bit(unpin, 0, &start, &end,
EXTENT_DIRTY);
Expand All @@ -3576,6 +3578,15 @@ static int btrfs_destroy_pinned_extent(struct btrfs_root *root,
cond_resched();
}

if (loop) {
if (unpin == &root->fs_info->freed_extents[0])
unpin = &root->fs_info->freed_extents[1];
else
unpin = &root->fs_info->freed_extents[0];
loop = false;
goto again;
}

return 0;
}

Expand Down

0 comments on commit 0c3939e

Please sign in to comment.