diff options
author | Ingo Molnar <mingo@kernel.org> | 2018-01-06 12:07:10 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-01-06 12:07:10 +0100 |
commit | b6815f354518591400ce4c3a5fd63337643710ff (patch) | |
tree | 14f8a117b4556f7dba5a5a9ccebc5e3b204cbd56 /fs/xfs/xfs_aops.c | |
parent | a0a8f2ada3f50f0190ebcbb60e77e697444c470e (diff) | |
parent | 89876f275e8d562912d9c238cd888b52065cf25c (diff) | |
download | linux-b6815f354518591400ce4c3a5fd63337643710ff.tar.bz2 |
Merge branch 'linus' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_aops.c')
-rw-r--r-- | fs/xfs/xfs_aops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 21e2d70884e1..4fc526a27a94 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -399,7 +399,7 @@ xfs_map_blocks( (ip->i_df.if_flags & XFS_IFEXTENTS)); ASSERT(offset <= mp->m_super->s_maxbytes); - if ((xfs_ufsize_t)offset + count > mp->m_super->s_maxbytes) + if (offset > mp->m_super->s_maxbytes - count) count = mp->m_super->s_maxbytes - offset; end_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)offset + count); offset_fsb = XFS_B_TO_FSBT(mp, offset); @@ -1312,7 +1312,7 @@ xfs_get_blocks( lockmode = xfs_ilock_data_map_shared(ip); ASSERT(offset <= mp->m_super->s_maxbytes); - if ((xfs_ufsize_t)offset + size > mp->m_super->s_maxbytes) + if (offset > mp->m_super->s_maxbytes - size) size = mp->m_super->s_maxbytes - offset; end_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)offset + size); offset_fsb = XFS_B_TO_FSBT(mp, offset); |