Skip to content

Commit

Permalink
xfs: remove s_maxbytes enforcement in xfs_file_read_iter
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Dave Chinner <[email protected]>
Signed-off-by: Dave Chinner <[email protected]>
  • Loading branch information
Christoph Hellwig authored and dchinner committed Jul 20, 2016
1 parent 3176c3e commit cf81071
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions fs/xfs/xfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ xfs_file_read_iter(
struct xfs_mount *mp = ip->i_mount;
size_t size = iov_iter_count(to);
ssize_t ret = 0;
xfs_fsize_t n;
loff_t pos = iocb->ki_pos;

XFS_STATS_INC(mp, xs_read_calls);
Expand All @@ -309,13 +308,6 @@ xfs_file_read_iter(
}
}

n = mp->m_super->s_maxbytes - pos;
if (n <= 0 || size == 0)
return 0;

if (n < size)
size = n;

if (XFS_FORCED_SHUTDOWN(mp))
return -EIO;

Expand Down

0 comments on commit cf81071

Please sign in to comment.