summaryrefslogtreecommitdiff
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-01-03 09:22:38 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:58 -0400
commitf9ef6604ace23a6fcd698e08b58a883d6009157b (patch)
tree2fd2868313ac5b5c6390dc6fee3730afd0f4addb /fs/btrfs/extent-tree.c
parent4313b3994d719fcdeb7e661473019ca3d62e829b (diff)
downloadlwn-f9ef6604ace23a6fcd698e08b58a883d6009157b.tar.gz
lwn-f9ef6604ace23a6fcd698e08b58a883d6009157b.zip
Btrfs: 32 bit compile fixes for the resizer and enospc checks
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 6137f06091e8..54f2b1d8bdfd 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -2501,6 +2501,7 @@ int btrfs_grow_extent_tree(struct btrfs_trans_handle *trans,
u64 nr = 0;
u64 cur_byte;
u64 old_size;
+ unsigned long rem;
struct btrfs_block_group_cache *cache;
struct btrfs_block_group_item *item;
struct btrfs_fs_info *info = root->fs_info;
@@ -2538,7 +2539,8 @@ int btrfs_grow_extent_tree(struct btrfs_trans_handle *trans,
struct btrfs_block_group_item);
btrfs_set_disk_block_group_used(leaf, item, 0);
- if (nr % 3) {
+ div_long_long_rem(nr, 3, &rem);
+ if (rem) {
btrfs_set_disk_block_group_flags(leaf, item,
BTRFS_BLOCK_GROUP_DATA);
} else {