aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/xfs_vnodeops.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 23cfa5837728..4fbc3e1cac00 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -4272,7 +4272,7 @@ xfs_free_file_space(
4272 xfs_mount_t *mp; 4272 xfs_mount_t *mp;
4273 int nimap; 4273 int nimap;
4274 uint resblks; 4274 uint resblks;
4275 int rounding; 4275 uint rounding;
4276 int rt; 4276 int rt;
4277 xfs_fileoff_t startoffset_fsb; 4277 xfs_fileoff_t startoffset_fsb;
4278 xfs_trans_t *tp; 4278 xfs_trans_t *tp;
@@ -4313,8 +4313,7 @@ xfs_free_file_space(
4313 vn_iowait(vp); /* wait for the completion of any pending DIOs */ 4313 vn_iowait(vp); /* wait for the completion of any pending DIOs */
4314 } 4314 }
4315 4315
4316 rounding = MAX((__uint8_t)(1 << mp->m_sb.sb_blocklog), 4316 rounding = max_t(uint, 1 << mp->m_sb.sb_blocklog, NBPP);
4317 (__uint8_t)NBPP);
4318 ilen = len + (offset & (rounding - 1)); 4317 ilen = len + (offset & (rounding - 1));
4319 ioffset = offset & ~(rounding - 1); 4318 ioffset = offset & ~(rounding - 1);
4320 if (ilen & (rounding - 1)) 4319 if (ilen & (rounding - 1))