Skip to contentSkip to conversation

fs/xfs/xfs_bmap.c:xfs_bmapi(): fix a bug

PATCH In review Adrian Bunk 2 participants 2 messages Aug 26, 2006 – Aug 28, 2006 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/xfs/xfs_bmap.c:xfs_bmapi(): fix a bug

This patch fixes the following bug introduced by commit 39269e29d4aad04252e0debec4c9b01bac16a257:

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).

fs/xfs/xfs_bmap.c renamed from fs/xfs/xfs_bmap.c.old +1 -1
@@ -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;
#1 lore raw
Quoted 3 lines · Adrian Bunk

...
Since bma.conv is a char and XFS_BMAPI_CONVERT is 0x1000, bma.conv was always assigned zero.

Yep, looks good, thanks Adrian.

cheers.

Signature · 1 line
Nathan