From 66f2e4c240cf4ba86f297f422b6e04a14f3bfe13 Mon Sep 17 00:00:00 2001 From: Bob Peterson Date: Wed, 12 Dec 2007 09:24:08 -0600 Subject: [PATCH] --- yaml --- r: 76051 b: refs/heads/master c: b3513fca7e41965d85125c9770ce5f8fd4ff509a h: refs/heads/master i: 76049: 444a64c61990cd9b530b3fda448e1f53509576a6 76047: 7adcd5b35e59ada6ef2a8c5682f097206d2a465b v: v3 --- [refs] | 2 +- trunk/fs/gfs2/rgrp.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 26cb2b5c147b..1fac79b8a4a9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 15c7cee7995a9013f1b2f31a15b70e1d2e8ae501 +refs/heads/master: b3513fca7e41965d85125c9770ce5f8fd4ff509a diff --git a/trunk/fs/gfs2/rgrp.c b/trunk/fs/gfs2/rgrp.c index d7ff9cf6653f..68c4bf363c46 100644 --- a/trunk/fs/gfs2/rgrp.c +++ b/trunk/fs/gfs2/rgrp.c @@ -133,10 +133,9 @@ static u32 gfs2_bitfit(unsigned char *buffer, unsigned int buflen, u32 goal, u32 blk = goal; unsigned int bit, bitlong; unsigned long *plong, plong55; - static int c = 0; byte = buffer + (goal / GFS2_NBBY); - plong = buffer + (goal / GFS2_NBBY); + plong = (unsigned long *)(buffer + (goal / GFS2_NBBY)); bit = (goal % GFS2_NBBY) * GFS2_BIT_SIZE; bitlong = bit; #if BITS_PER_LONG == 32 @@ -152,10 +151,8 @@ static u32 gfs2_bitfit(unsigned char *buffer, unsigned int buflen, u32 goal, blk += sizeof(unsigned long) * GFS2_NBBY; continue; } - if (((*byte >> bit) & GFS2_BIT_MASK) == old_state) { - c++; + if (((*byte >> bit) & GFS2_BIT_MASK) == old_state) return blk; - } bit += GFS2_BIT_SIZE; if (bit >= 8) { bit = 0;