]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[GFS2] Minor correction
authorBob Peterson <rpeterso@redhat.com>
Wed, 12 Dec 2007 23:52:13 +0000 (17:52 -0600)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 25 Jan 2008 08:15:37 +0000 (08:15 +0000)
This is a small correction to my previously posted patch1.
It just changes a divide to a shift.  It's faster and doesn't
introduce odd dependencies on 32-bit compiles.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/ops_fstype.c

index 79f9bb365f107794f50d46b1290f9f58d0563c86..5537798af381937f96d00e96f16e34e5f221427d 100644 (file)
@@ -332,7 +332,7 @@ static int map_journal_extents(struct gfs2_sbd *sdp)
        INIT_LIST_HEAD(&jd->extent_list);
        prev_db = 0;
 
-       for (lb = 0; lb < ip->i_di.di_size / sdp->sd_sb.sb_bsize; lb++) {
+       for (lb = 0; lb < ip->i_di.di_size >> sdp->sd_sb.sb_bsize_shift; lb++) {
                bh.b_state = 0;
                bh.b_blocknr = 0;
                bh.b_size = 1 << ip->i_inode.i_blkbits;