Skip to content

Commit

Permalink
[XFS] Fix char size overflow in bmap_alloc call for unwritten extent
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Nathan Scott <[email protected]>
  • Loading branch information
AdrianBunk authored and natoscott committed Aug 30, 2006
1 parent 1ad8f40 commit 7288026
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/xfs/xfs_bmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7288026

Please sign in to comment.