lkml.org 
[lkml]   [2008]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] btrfs - replace div_long_long_rem()
From
Date
Hi Chris,

While compiling btrfs against 2.6.25-rc8-mm1, ran into this.
div_long_long_rem() is removed in -mm. Replace with div_u64_rem().

Thanks,
Badari

div_long_long_rem() API is being removed (patch in -mm).
Replace div_long_long_rem() with div_u64_rem().

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
---
extent-tree.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Index: btrfs-0.13/extent-tree.c
===================================================================
--- btrfs-0.13.orig/extent-tree.c 2008-02-21 11:54:12.000000000 -0800
+++ btrfs-0.13/extent-tree.c 2008-04-03 07:18:04.000000000 -0800
@@ -19,6 +19,7 @@
#include <linux/sched.h>
#include <linux/crc32c.h>
#include <linux/pagemap.h>
+#include <linux/math64.h>
#include "hash.h"
#include "ctree.h"
#include "disk-io.h"
@@ -2653,7 +2654,7 @@
u64 nr = 0;
u64 cur_byte;
u64 old_size;
- unsigned long rem;
+ u32 rem;
struct btrfs_block_group_cache *cache;
struct btrfs_block_group_item *item;
struct btrfs_fs_info *info = root->fs_info;
@@ -2691,7 +2692,7 @@
struct btrfs_block_group_item);

btrfs_set_disk_block_group_used(leaf, item, 0);
- div_long_long_rem(nr, 3, &rem);
+ div_u64_rem(nr, 3, &rem);
if (rem) {
btrfs_set_disk_block_group_flags(leaf, item,
BTRFS_BLOCK_GROUP_DATA);



\
 
 \ /
  Last update: 2008-04-03 17:53    [W:0.172 / U:1.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site