aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_vnodeops.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2012-06-08 01:44:54 -0400
committerBen Myers <bpm@sgi.com>2012-06-14 13:28:24 -0400
commit32972383ca46223aa2b129826b3789721ec147aa (patch)
tree11750ff77efd52b933bb1531b0129eb32597fff8 /fs/xfs/xfs_vnodeops.c
parentd2c2819117176e139dc761873c664aaa770c79c9 (diff)
xfs: make largest supported offset less shouty
XFS_MAXIOFFSET() is just a simple macro that resolves to mp->m_maxioffset. It doesn't need to exist, and it just makes the code unnecessarily loud and shouty. Make it quiet and easy to read. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r--fs/xfs/xfs_vnodeops.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index b6a82d817a82..c22f4e0ecac1 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -174,7 +174,7 @@ xfs_free_eofblocks(
174 * of the file. If not, then there is nothing to do. 174 * of the file. If not, then there is nothing to do.
175 */ 175 */
176 end_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)XFS_ISIZE(ip)); 176 end_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)XFS_ISIZE(ip));
177 last_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)XFS_MAXIOFFSET(mp)); 177 last_fsb = XFS_B_TO_FSB(mp, mp->m_super->s_maxbytes);
178 if (last_fsb <= end_fsb) 178 if (last_fsb <= end_fsb)
179 return 0; 179 return 0;
180 map_len = last_fsb - end_fsb; 180 map_len = last_fsb - end_fsb;
@@ -2262,10 +2262,10 @@ xfs_change_file_space(
2262 2262
2263 llen = bf->l_len > 0 ? bf->l_len - 1 : bf->l_len; 2263 llen = bf->l_len > 0 ? bf->l_len - 1 : bf->l_len;
2264 2264
2265 if ( (bf->l_start < 0) 2265 if (bf->l_start < 0 ||
2266 || (bf->l_start > XFS_MAXIOFFSET(mp)) 2266 bf->l_start > mp->m_super->s_maxbytes ||
2267 || (bf->l_start + llen < 0) 2267 bf->l_start + llen < 0 ||
2268 || (bf->l_start + llen > XFS_MAXIOFFSET(mp))) 2268 bf->l_start + llen > mp->m_super->s_maxbytes)
2269 return XFS_ERROR(EINVAL); 2269 return XFS_ERROR(EINVAL);
2270 2270
2271 bf->l_whence = 0; 2271 bf->l_whence = 0;