[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1193244441-10149-5-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
Date: Wed, 24 Oct 2007 22:17:18 +0530
From: "Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
To: linux-ext4@...r.kernel.org
Cc: "Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
Subject: [PATCH] ext4: Fix mballoc BUG when running compilebench
This fix the mballoc bug when running compile bench.
Instead of using direct division even though the arguments
are 32 bits we retain do_div. This would be needed if we
move to 64 bit logical block number.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@...ux.vnet.ibm.com>
---
fs/ext4/mballoc.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index fe7cf9e..8467b3d 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -3089,13 +3089,14 @@ static void ext4_mb_normalize_request(struct ext4_allocation_context *ac,
}
}
if (wind == 0) {
+ __u64 tstart;
/* file is quite large, we now preallocate with
* the biggest configured window with regart to
* logical offset */
wind = sbi->s_mb_prealloc_table[i - 1];
- start = ac->ac_o_ex.fe_logical;
- do_div(start, wind);
- start = start * wind;
+ tstart = ac->ac_o_ex.fe_logical;
+ do_div(tstart, wind);
+ start = tstart * wind;
}
size = wind;
orig_size = size;
--
1.5.3.4.319.gdd817-dirty
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists