aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2017-05-11 14:01:08 -0500
committerEric Sandeen <sandeen@redhat.com>2017-05-11 14:01:08 -0500
commitf1e0bd8de4ea298f3c728eeaaafbdb08a08db023 (patch)
treeb2bb512197c95175518745c6bce2173c9b96a2a1
parent52bff9442d464afd5f5e7e1c7bf6dd9c7ca5cd6e (diff)
downloadxfsprogs-dev-f1e0bd8de4ea298f3c728eeaaafbdb08a08db023.tar.gz
xfs: more do_div cleanups
Source kernel commit: 4f1adf3373f072246c14119b2aa6dfb4d6510a43 On some architectures do_div does the pointer compare trick to make sure that we've sent it an unsigned 64-bit number. (Why unsigned? I don't know.) Fix up the few places that squawk about this; in xfs_bmap_wants_extents() we just used a bare int64_t so change that to unsigned. In xfs_adjust_extent_unmap_boundaries() all we wanted was the mod, and we have an xfs-specific function to handle that w/o side effects, which includes proper casting for do_div. In xfs_daddr_to_ag[b]no, we were using the wrong type anyway; XFS_BB_TO_FSBT returns a block in the filesystem, so use xfs_rfsblock_t not xfs_daddr_t, and gain the unsignedness from that type as a bonus. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
-rw-r--r--libxfs/xfs_bmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libxfs/xfs_bmap.c b/libxfs/xfs_bmap.c
index 61a9f72daf..5f9e68e5d7 100644
--- a/libxfs/xfs_bmap.c
+++ b/libxfs/xfs_bmap.c
@@ -4878,7 +4878,7 @@ xfs_bmap_del_extent_delay(
ASSERT(got_endoff >= del_endoff);
if (isrt) {
- int64_t rtexts = XFS_FSB_TO_B(mp, del->br_blockcount);
+ uint64_t rtexts = XFS_FSB_TO_B(mp, del->br_blockcount);
do_div(rtexts, mp->m_sb.sb_rextsize);
xfs_mod_frextents(mp, rtexts);