[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:
committed by
Lachlan McIlroy
parent
f7b7c3673e
commit
e6a4b37f38
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user