[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090810145641.GB4925@cmpxchg.org>
Date: Mon, 10 Aug 2009 16:56:41 +0200
From: Johannes Weiner <hannes@...xchg.org>
To: Jeff Layton <jlayton@...hat.com>
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org, hch@...radead.org, rlove@...gle.com,
msb@...gle.com, viro@...iv.linux.org.uk
Subject: Re: [PATCH 2/3] vfs: remove redundant position check in do_sendfile
On Mon, Aug 10, 2009 at 08:17:42AM -0400, Jeff Layton wrote:
> 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 <jlayton@...hat.com>
Reviewed-by: Johannes Weiner <hannes@...xchg.org>
Thanks!
> ---
> fs/read_write.c | 3 ---
> 1 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/fs/read_write.c b/fs/read_write.c
> index 6c8c55d..3ac2898 100644
> --- a/fs/read_write.c
> +++ b/fs/read_write.c
> @@ -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)
> --
> 1.6.0.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists