mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
vfs: remove redundant position check in do_sendfile
As Johannes Weiner pointed out, one of the range checks in do_sendfile is redundant and is already checked in rw_verify_area. Signed-off-by: Jeff Layton <[email protected]> Reviewed-by: Johannes Weiner <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Al Viro <[email protected]> Cc: Robert Love <[email protected]> Cc: Mandeep Singh Baines <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
42cb56ae2a
commit
f9098980ff
1 changed files with 0 additions and 3 deletions
|
|
@ -839,9 +839,6 @@ static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos,
|
|||
max = min(in_inode->i_sb->s_maxbytes, out_inode->i_sb->s_maxbytes);
|
||||
|
||||
pos = *ppos;
|
||||
retval = -EINVAL;
|
||||
if (unlikely(pos < 0))
|
||||
goto fput_out;
|
||||
if (unlikely(pos + count > max)) {
|
||||
retval = -EOVERFLOW;
|
||||
if (pos >= max)
|
||||
|
|
|
|||
Loading…
Reference in a new issue