[XFS] Remove the BPCSHIFT and NB* based macros from XFS.

The BPCSHIFT based macros, btoc*, ctob*, offtoc* and ctooff are either not
used or don't need to be used. The NDPP, NDPP, NBBY macros don't need to
be used but instead are replaced directly by PAGE_SIZE and PAGE_CACHE_SIZE
where appropriate. Initial patch and motivation from Nicolas Kaiser.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30096a

Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
This commit is contained in:
Tim Shimmin
2007-11-23 16:30:42 +11:00
committed by Lachlan McIlroy
parent f7b7c3673e
commit e6a4b37f38
7 changed files with 17 additions and 47 deletions

View File

@@ -4164,15 +4164,12 @@ xfs_free_file_space(
vn_iowait(ip); /* wait for the completion of any pending DIOs */
}
rounding = max_t(uint, 1 << mp->m_sb.sb_blocklog, NBPP);
rounding = max_t(uint, 1 << mp->m_sb.sb_blocklog, PAGE_CACHE_SIZE);
ioffset = offset & ~(rounding - 1);
if (VN_CACHED(vp) != 0) {
xfs_inval_cached_trace(ip, ioffset, -1,
ctooff(offtoct(ioffset)), -1);
error = xfs_flushinval_pages(ip,
ctooff(offtoct(ioffset)),
-1, FI_REMAPF_LOCKED);
xfs_inval_cached_trace(ip, ioffset, -1, ioffset, -1);
error = xfs_flushinval_pages(ip, ioffset, -1, FI_REMAPF_LOCKED);
if (error)
goto out_unlock_iolock;
}