Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276132
b: refs/heads/master
c: b772a86
h: refs/heads/master
v: v3
  • Loading branch information
Li Zefan authored and David Sterba committed Nov 30, 2011
1 parent 8502f49 commit a880dd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: ece7d20e8be6730fbb29f4550de6b19b1a3a9387
refs/heads/master: b772a86ea6d932ac29d5e50e67c977653c832f8a
6 changes: 3 additions & 3 deletions trunk/fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ static int btrfs_calc_avail_data_space(struct btrfs_root *root, u64 *free_bytes)
int i = 0, nr_devices;
int ret;

nr_devices = fs_info->fs_devices->rw_devices;
nr_devices = fs_info->fs_devices->open_devices;
BUG_ON(!nr_devices);

devices_info = kmalloc(sizeof(*devices_info) * nr_devices,
Expand All @@ -1105,8 +1105,8 @@ static int btrfs_calc_avail_data_space(struct btrfs_root *root, u64 *free_bytes)
else
min_stripe_size = BTRFS_STRIPE_LEN;

list_for_each_entry(device, &fs_devices->alloc_list, dev_alloc_list) {
if (!device->in_fs_metadata)
list_for_each_entry(device, &fs_devices->devices, dev_list) {
if (!device->in_fs_metadata || !device->bdev)
continue;

avail_space = device->total_bytes - device->bytes_used;
Expand Down

0 comments on commit a880dd4

Please sign in to comment.