diff options
author | Christoph Hellwig <hch@lst.de> | 2016-07-19 21:31:53 -0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-07-19 21:31:53 -0400 |
commit | cf810712cc82cbfab8f08a46ca6c0289d386a303 (patch) | |
tree | 4b4a278d5fbea8bdc5f86c1271ee48fa6ce6fbb4 | |
parent | 3176c3e0ef32963aa5f6f9754142e420a4ba5d64 (diff) |
xfs: remove s_maxbytes enforcement in xfs_file_read_iter
All the three low-level read implementations that we might call already
take care of not overflowing the maximum supported bytes, no need to
duplicate it here.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
-rw-r--r-- | fs/xfs/xfs_file.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index e51622c8e482..7ec8225b7fd2 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c | |||
@@ -292,7 +292,6 @@ xfs_file_read_iter( | |||
292 | struct xfs_mount *mp = ip->i_mount; | 292 | struct xfs_mount *mp = ip->i_mount; |
293 | size_t size = iov_iter_count(to); | 293 | size_t size = iov_iter_count(to); |
294 | ssize_t ret = 0; | 294 | ssize_t ret = 0; |
295 | xfs_fsize_t n; | ||
296 | loff_t pos = iocb->ki_pos; | 295 | loff_t pos = iocb->ki_pos; |
297 | 296 | ||
298 | XFS_STATS_INC(mp, xs_read_calls); | 297 | XFS_STATS_INC(mp, xs_read_calls); |
@@ -309,13 +308,6 @@ xfs_file_read_iter( | |||
309 | } | 308 | } |
310 | } | 309 | } |
311 | 310 | ||
312 | n = mp->m_super->s_maxbytes - pos; | ||
313 | if (n <= 0 || size == 0) | ||
314 | return 0; | ||
315 | |||
316 | if (n < size) | ||
317 | size = n; | ||
318 | |||
319 | if (XFS_FORCED_SHUTDOWN(mp)) | 311 | if (XFS_FORCED_SHUTDOWN(mp)) |
320 | return -EIO; | 312 | return -EIO; |
321 | 313 | ||