relay: fix "full buffer with exactly full last subbuffer" accounting problem
commitf187e1318dcf48309bf2d7d3715c7958932ebf18
authorTom Zanussi <tzanussi@gmail.com>
Sat, 2 Aug 2008 02:32:56 +0000 (2 05:32 +0300)
committerEduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Mon, 4 Aug 2008 04:49:05 +0000 (4 07:49 +0300)
tree5d5ec0fa186d90cce74916b602a3407d0926c181
parent5f00bfed0ec6451350491f51147385c1b0310331
relay: fix "full buffer with exactly full last subbuffer" accounting problem

In relay's current read implementation, if the buffer is completely full
but hasn't triggered the buffer-full condition (i.e. the last write
didn't cross the subbuffer boundary) and the last subbuffer is exactly
full, the subbuffer accounting code erroneously finds nothing available.
This patch fixes the problem.

Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Mathieu Desnoyers <compudj@krystal.dyndns.org>
Cc: Andrea Righi <righi.andrea@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
kernel/relay.c