diff options
Diffstat (limited to 'fs/xfs/xfs_bmap.c')
-rw-r--r-- | fs/xfs/xfs_bmap.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index 024d8452c3d3..fa459a184b8a 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c | |||
@@ -684,7 +684,7 @@ xfs_bmap_add_extent( | |||
684 | ASSERT(nblks <= da_old); | 684 | ASSERT(nblks <= da_old); |
685 | if (nblks < da_old) | 685 | if (nblks < da_old) |
686 | xfs_mod_incore_sb(ip->i_mount, XFS_SBS_FDBLOCKS, | 686 | xfs_mod_incore_sb(ip->i_mount, XFS_SBS_FDBLOCKS, |
687 | (int)(da_old - nblks), rsvd); | 687 | (int64_t)(da_old - nblks), rsvd); |
688 | } | 688 | } |
689 | /* | 689 | /* |
690 | * Clear out the allocated field, done with it now in any case. | 690 | * Clear out the allocated field, done with it now in any case. |
@@ -1209,7 +1209,7 @@ xfs_bmap_add_extent_delay_real( | |||
1209 | diff = (int)(temp + temp2 - STARTBLOCKVAL(PREV.br_startblock) - | 1209 | diff = (int)(temp + temp2 - STARTBLOCKVAL(PREV.br_startblock) - |
1210 | (cur ? cur->bc_private.b.allocated : 0)); | 1210 | (cur ? cur->bc_private.b.allocated : 0)); |
1211 | if (diff > 0 && | 1211 | if (diff > 0 && |
1212 | xfs_mod_incore_sb(ip->i_mount, XFS_SBS_FDBLOCKS, -diff, rsvd)) { | 1212 | xfs_mod_incore_sb(ip->i_mount, XFS_SBS_FDBLOCKS, -((int64_t)diff), rsvd)) { |
1213 | /* | 1213 | /* |
1214 | * Ick gross gag me with a spoon. | 1214 | * Ick gross gag me with a spoon. |
1215 | */ | 1215 | */ |
@@ -1220,7 +1220,7 @@ xfs_bmap_add_extent_delay_real( | |||
1220 | diff--; | 1220 | diff--; |
1221 | if (!diff || | 1221 | if (!diff || |
1222 | !xfs_mod_incore_sb(ip->i_mount, | 1222 | !xfs_mod_incore_sb(ip->i_mount, |
1223 | XFS_SBS_FDBLOCKS, -diff, rsvd)) | 1223 | XFS_SBS_FDBLOCKS, -((int64_t)diff), rsvd)) |
1224 | break; | 1224 | break; |
1225 | } | 1225 | } |
1226 | if (temp2) { | 1226 | if (temp2) { |
@@ -1228,7 +1228,7 @@ xfs_bmap_add_extent_delay_real( | |||
1228 | diff--; | 1228 | diff--; |
1229 | if (!diff || | 1229 | if (!diff || |
1230 | !xfs_mod_incore_sb(ip->i_mount, | 1230 | !xfs_mod_incore_sb(ip->i_mount, |
1231 | XFS_SBS_FDBLOCKS, -diff, rsvd)) | 1231 | XFS_SBS_FDBLOCKS, -((int64_t)diff), rsvd)) |
1232 | break; | 1232 | break; |
1233 | } | 1233 | } |
1234 | } | 1234 | } |
@@ -2015,7 +2015,7 @@ xfs_bmap_add_extent_hole_delay( | |||
2015 | if (oldlen != newlen) { | 2015 | if (oldlen != newlen) { |
2016 | ASSERT(oldlen > newlen); | 2016 | ASSERT(oldlen > newlen); |
2017 | xfs_mod_incore_sb(ip->i_mount, XFS_SBS_FDBLOCKS, | 2017 | xfs_mod_incore_sb(ip->i_mount, XFS_SBS_FDBLOCKS, |
2018 | (int)(oldlen - newlen), rsvd); | 2018 | (int64_t)(oldlen - newlen), rsvd); |
2019 | /* | 2019 | /* |
2020 | * Nothing to do for disk quota accounting here. | 2020 | * Nothing to do for disk quota accounting here. |
2021 | */ | 2021 | */ |
@@ -3359,7 +3359,7 @@ xfs_bmap_del_extent( | |||
3359 | */ | 3359 | */ |
3360 | ASSERT(da_old >= da_new); | 3360 | ASSERT(da_old >= da_new); |
3361 | if (da_old > da_new) | 3361 | if (da_old > da_new) |
3362 | xfs_mod_incore_sb(mp, XFS_SBS_FDBLOCKS, (int)(da_old - da_new), | 3362 | xfs_mod_incore_sb(mp, XFS_SBS_FDBLOCKS, (int64_t)(da_old - da_new), |
3363 | rsvd); | 3363 | rsvd); |
3364 | if (delta) { | 3364 | if (delta) { |
3365 | /* DELTA: report the original extent. */ | 3365 | /* DELTA: report the original extent. */ |
@@ -4930,28 +4930,28 @@ xfs_bmapi( | |||
4930 | if (rt) { | 4930 | if (rt) { |
4931 | error = xfs_mod_incore_sb(mp, | 4931 | error = xfs_mod_incore_sb(mp, |
4932 | XFS_SBS_FREXTENTS, | 4932 | XFS_SBS_FREXTENTS, |
4933 | -(extsz), (flags & | 4933 | -((int64_t)extsz), (flags & |
4934 | XFS_BMAPI_RSVBLOCKS)); | 4934 | XFS_BMAPI_RSVBLOCKS)); |
4935 | } else { | 4935 | } else { |
4936 | error = xfs_mod_incore_sb(mp, | 4936 | error = xfs_mod_incore_sb(mp, |
4937 | XFS_SBS_FDBLOCKS, | 4937 | XFS_SBS_FDBLOCKS, |
4938 | -(alen), (flags & | 4938 | -((int64_t)alen), (flags & |
4939 | XFS_BMAPI_RSVBLOCKS)); | 4939 | XFS_BMAPI_RSVBLOCKS)); |
4940 | } | 4940 | } |
4941 | if (!error) { | 4941 | if (!error) { |
4942 | error = xfs_mod_incore_sb(mp, | 4942 | error = xfs_mod_incore_sb(mp, |
4943 | XFS_SBS_FDBLOCKS, | 4943 | XFS_SBS_FDBLOCKS, |
4944 | -(indlen), (flags & | 4944 | -((int64_t)indlen), (flags & |
4945 | XFS_BMAPI_RSVBLOCKS)); | 4945 | XFS_BMAPI_RSVBLOCKS)); |
4946 | if (error && rt) | 4946 | if (error && rt) |
4947 | xfs_mod_incore_sb(mp, | 4947 | xfs_mod_incore_sb(mp, |
4948 | XFS_SBS_FREXTENTS, | 4948 | XFS_SBS_FREXTENTS, |
4949 | extsz, (flags & | 4949 | (int64_t)extsz, (flags & |
4950 | XFS_BMAPI_RSVBLOCKS)); | 4950 | XFS_BMAPI_RSVBLOCKS)); |
4951 | else if (error) | 4951 | else if (error) |
4952 | xfs_mod_incore_sb(mp, | 4952 | xfs_mod_incore_sb(mp, |
4953 | XFS_SBS_FDBLOCKS, | 4953 | XFS_SBS_FDBLOCKS, |
4954 | alen, (flags & | 4954 | (int64_t)alen, (flags & |
4955 | XFS_BMAPI_RSVBLOCKS)); | 4955 | XFS_BMAPI_RSVBLOCKS)); |
4956 | } | 4956 | } |
4957 | 4957 | ||
@@ -5617,13 +5617,13 @@ xfs_bunmapi( | |||
5617 | rtexts = XFS_FSB_TO_B(mp, del.br_blockcount); | 5617 | rtexts = XFS_FSB_TO_B(mp, del.br_blockcount); |
5618 | do_div(rtexts, mp->m_sb.sb_rextsize); | 5618 | do_div(rtexts, mp->m_sb.sb_rextsize); |
5619 | xfs_mod_incore_sb(mp, XFS_SBS_FREXTENTS, | 5619 | xfs_mod_incore_sb(mp, XFS_SBS_FREXTENTS, |
5620 | (int)rtexts, rsvd); | 5620 | (int64_t)rtexts, rsvd); |
5621 | (void)XFS_TRANS_RESERVE_QUOTA_NBLKS(mp, | 5621 | (void)XFS_TRANS_RESERVE_QUOTA_NBLKS(mp, |
5622 | NULL, ip, -((long)del.br_blockcount), 0, | 5622 | NULL, ip, -((long)del.br_blockcount), 0, |
5623 | XFS_QMOPT_RES_RTBLKS); | 5623 | XFS_QMOPT_RES_RTBLKS); |
5624 | } else { | 5624 | } else { |
5625 | xfs_mod_incore_sb(mp, XFS_SBS_FDBLOCKS, | 5625 | xfs_mod_incore_sb(mp, XFS_SBS_FDBLOCKS, |
5626 | (int)del.br_blockcount, rsvd); | 5626 | (int64_t)del.br_blockcount, rsvd); |
5627 | (void)XFS_TRANS_RESERVE_QUOTA_NBLKS(mp, | 5627 | (void)XFS_TRANS_RESERVE_QUOTA_NBLKS(mp, |
5628 | NULL, ip, -((long)del.br_blockcount), 0, | 5628 | NULL, ip, -((long)del.br_blockcount), 0, |
5629 | XFS_QMOPT_RES_REGBLKS); | 5629 | XFS_QMOPT_RES_REGBLKS); |