* [to-be-updated] vfs-remove-redundant-checks-in-do_sendfile.patch removed from -mm tree
@ 2009-08-18 9:34 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2009-08-18 9:34 UTC (permalink / raw)
To: jlayton, hannes, hch, msb, rlove, viro, mm-commits
The patch titled
vfs: remove redundant checks in do_sendfile
has been removed from the -mm tree. Its filename was
vfs-remove-redundant-checks-in-do_sendfile.patch
This patch was dropped because an updated version will be merged
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: vfs: remove redundant checks in do_sendfile
From: Jeff Layton <jlayton@redhat.com>
As Johannes Weiner pointed out, a couple of the range checks in
do_sendfile are redundant and are already checked in rw_verify_area.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Robert Love <rlove@google.com>
Cc: Mandeep Singh Baines <msb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/read_write.c | 11 -----------
1 file changed, 11 deletions(-)
diff -puN fs/read_write.c~vfs-remove-redundant-checks-in-do_sendfile fs/read_write.c
--- a/fs/read_write.c~vfs-remove-redundant-checks-in-do_sendfile
+++ a/fs/read_write.c
@@ -792,7 +792,6 @@ static ssize_t do_sendfile(int out_fd, i
{
struct file * in_file, * out_file;
struct inode * in_inode, * out_inode;
- loff_t pos;
ssize_t retval;
int fput_needed_in, fput_needed_out, fl;
@@ -838,17 +837,7 @@ static ssize_t do_sendfile(int out_fd, i
if (!max)
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)
- goto fput_out;
- count = max - pos;
- }
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-08-18 9:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-18 9:34 [to-be-updated] vfs-remove-redundant-checks-in-do_sendfile.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.