Skip to contentSkip to conversation

Minor correction

PATCH New Bob Peterson 1 participant 1 message Dec 12, 2007 GFS2 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Minor correction

Hi,

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.

Regards,

Bob Peterson
--

--

 fs/gfs2/ops_fstype.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/gfs2/ops_fstype.c +1 -1
index 6a2ef0d..ebd86f5 100644
@@ -346,7 +346,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;