From: Adrian Bunk Date: Wed, 30 Aug 2006 03:41:58 +0000 (+1000) Subject: [XFS] Fix char size overflow in bmap_alloc call for unwritten extent X-Git-Tag: v2.6.18-rc6~56 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7288026b8671061aff7663b1766037b3f2573627;p=linux-2.6 [XFS] Fix char size overflow in bmap_alloc call for unwritten extent conversion. Since bma.conv is a char and XFS_BMAPI_CONVERT is 0x1000, bma.conv was always assigned zero. Spotted by the GNU C compiler (SVN version). SGI-PV: 947312 SGI-Modid: xfs-linux-melb:xfs-kern:26887a Signed-off-by: Adrian Bunk Signed-off-by: Nathan Scott --- diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index 3a61375390..bf46fae303 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c @@ -4993,7 +4993,7 @@ xfs_bmapi( bma.firstblock = *firstblock; bma.alen = alen; bma.off = aoff; - bma.conv = (flags & XFS_BMAPI_CONVERT); + bma.conv = !!(flags & XFS_BMAPI_CONVERT); bma.wasdel = wasdelay; bma.minlen = minlen; bma.low = flist->xbf_low;