aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_vnodeops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r--fs/xfs/xfs_vnodeops.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 5322d9fb532..7f380e885a6 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -4164,15 +4164,12 @@ xfs_free_file_space(
4164 vn_iowait(ip); /* wait for the completion of any pending DIOs */ 4164 vn_iowait(ip); /* wait for the completion of any pending DIOs */
4165 } 4165 }
4166 4166
4167 rounding = max_t(uint, 1 << mp->m_sb.sb_blocklog, NBPP); 4167 rounding = max_t(uint, 1 << mp->m_sb.sb_blocklog, PAGE_CACHE_SIZE);
4168 ioffset = offset & ~(rounding - 1); 4168 ioffset = offset & ~(rounding - 1);
4169 4169
4170 if (VN_CACHED(vp) != 0) { 4170 if (VN_CACHED(vp) != 0) {
4171 xfs_inval_cached_trace(ip, ioffset, -1, 4171 xfs_inval_cached_trace(ip, ioffset, -1, ioffset, -1);
4172 ctooff(offtoct(ioffset)), -1); 4172 error = xfs_flushinval_pages(ip, ioffset, -1, FI_REMAPF_LOCKED);
4173 error = xfs_flushinval_pages(ip,
4174 ctooff(offtoct(ioffset)),
4175 -1, FI_REMAPF_LOCKED);
4176 if (error) 4173 if (error)
4177 goto out_unlock_iolock; 4174 goto out_unlock_iolock;
4178 } 4175 }