mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-10 11:30:49 +00:00
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>
This commit is contained in:
parent
3176c3e0ef
commit
cf810712cc
@ -292,7 +292,6 @@ xfs_file_read_iter(
|
|||||||
struct xfs_mount *mp = ip->i_mount;
|
struct xfs_mount *mp = ip->i_mount;
|
||||||
size_t size = iov_iter_count(to);
|
size_t size = iov_iter_count(to);
|
||||||
ssize_t ret = 0;
|
ssize_t ret = 0;
|
||||||
xfs_fsize_t n;
|
|
||||||
loff_t pos = iocb->ki_pos;
|
loff_t pos = iocb->ki_pos;
|
||||||
|
|
||||||
XFS_STATS_INC(mp, xs_read_calls);
|
XFS_STATS_INC(mp, xs_read_calls);
|
||||||
@ -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))
|
if (XFS_FORCED_SHUTDOWN(mp))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user