diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_inode.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 11a8c28c47bd..a17cf1f16498 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -2248,6 +2248,7 @@ xfs_ifree_cluster( int inodes_per_cluster; int nbufs; int i, j; + int ioffset; xfs_daddr_t blkno; xfs_buf_t *bp; xfs_inode_t *ip; @@ -2268,9 +2269,9 @@ xfs_ifree_cluster( * physically allocated. Skip the cluster if an inode falls into * a sparse region. */ - if ((xic->alloc & XFS_INOBT_MASK(inum - xic->first_ino)) == 0) { - ASSERT(((inum - xic->first_ino) % - inodes_per_cluster) == 0); + ioffset = inum - xic->first_ino; + if ((xic->alloc & XFS_INOBT_MASK(ioffset)) == 0) { + ASSERT(do_mod(ioffset, inodes_per_cluster) == 0); continue; } |