xfs: fix integer truncation in xfs_bmap_remap_alloc
authorChristoph Hellwig <hch@lst.de>
Tue, 11 Apr 2017 23:45:52 +0000 (16:45 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 25 Apr 2017 16:40:39 +0000 (09:40 -0700)
bno should be a xfs_fsblock_t, which is 64-bit wides instead of a
xfs_aglock_t, which truncates the value to 32 bits.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/libxfs/xfs_bmap.c

index 9bd104f32908962046af6d2dd4437a045fecdb36..2a426d127e050c9fe4dcff540bb995b5dba1047b 100644 (file)
@@ -3863,7 +3863,7 @@ xfs_bmap_remap_alloc(
 {
        struct xfs_trans        *tp = ap->tp;
        struct xfs_mount        *mp = tp->t_mountp;
-       xfs_agblock_t           bno;
+       xfs_fsblock_t           bno;
        struct xfs_alloc_arg    args;
        int                     error;