Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274640
b: refs/heads/master
c: f75b130
h: refs/heads/master
v: v3
  • Loading branch information
Josef Bacik committed Oct 19, 2011
1 parent 7a43423 commit 95441ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73bc187680f94bed498f8a669103cad290e41180
refs/heads/master: f75b130e9bb361850787e156c79311adb84f551e
10 changes: 6 additions & 4 deletions trunk/fs/btrfs/free-space-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,10 +575,6 @@ int __btrfs_write_out_cache(struct btrfs_root *root, struct inode *inode,

INIT_LIST_HEAD(&bitmap_list);

node = rb_first(&ctl->free_space_offset);
if (!node)
return -1;

if (!i_size_read(inode))
return -1;

Expand Down Expand Up @@ -639,6 +635,12 @@ int __btrfs_write_out_cache(struct btrfs_root *root, struct inode *inode,
if (block_group)
start = block_group->key.objectid;

node = rb_first(&ctl->free_space_offset);
if (!node && cluster) {
node = rb_first(&cluster->root);
cluster = NULL;
}

/* Write out the extent entries */
do {
struct btrfs_free_space_entry *entry;
Expand Down

0 comments on commit 95441ac

Please sign in to comment.