[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/gfs2/convert gfs2_convert.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	rpeterso sourceware org	2006-08-14 03:03:29

Modified files:
	gfs2/convert   : gfs2_convert.c 

Log message:
	Fixed segfault converting bitmaps during inode conversion.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/convert/gfs2_convert.c.diff?cvsroot=cluster&r1=1.6&r2=1.7

--- cluster/gfs2/convert/gfs2_convert.c	2006/08/11 23:22:09	1.6
+++ cluster/gfs2/convert/gfs2_convert.c	2006/08/14 02:03:29	1.7
@@ -415,7 +415,8 @@
                     /* figure out offset of first bitmap byte for this map: */
 					buf_offset = (blk) ? sizeof(struct gfs2_meta_header) :
 						sizeof(struct gfs2_rgrp);
-					if (bitmap_byte < sbp->bsize) { /* if it's on this page */
+					/* if it's on this page */
+					if (buf_offset + bitmap_byte < sbp->bsize) {
 						rgd->bh[blk]->b_data[buf_offset + bitmap_byte] &=
 							~(0x03 << (GFS2_BIT_SIZE * byte_bit));
 						rgd->bh[blk]->b_data[buf_offset + bitmap_byte] |=


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]