[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090105.001401.63730458.davem@davemloft.net>
Date: Mon, 05 Jan 2009 00:14:01 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: jarkao2@...il.com
Cc: buytenh@...tstofly.org, jens.axboe@...cle.com, ben@...s.com,
opurdila@...acom.com, netdev@...r.kernel.org
Subject: Re: splice from half-closed socket returning -EAGAIN
From: Jarek Poplawski <jarkao2@...il.com>
Date: Mon, 5 Jan 2009 08:11:37 +0000
> On Sun, Jan 04, 2009 at 11:59:46PM -0800, David Miller wrote:
> > From: Lennert Buytenhek <buytenh@...tstofly.org>
> > Date: Mon, 5 Jan 2009 07:47:29 +0100
> >
> > > tcp: don't mask EOF and socket errors on nonblocking splice receive
> > >
> > > Currently, setting SPLICE_F_NONBLOCK on splice from a TCP socket
> > > results in masking of EOF (RDHUP) and error conditions on the socket
> > > by an -EAGAIN return. Move the NONBLOCK check in tcp_splice_read()
> > > to be after the EOF and error checks to fix this.
> > >
> > > Signed-off-by: Lennert Buytenhek <buytenh@...vell.com>
> >
> > This change looks like the perfect fix for this problem.
> >
>
> Actually, I wonder why this "if (flags & SPLICE_F_NONBLOCK)" can't
> be skipped at all. Isn't "if (!timeo)" enough now?
Is it really the same condition in the end?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists