]> git.karo-electronics.de Git - karo-tx-linux.git/commit
relay: fix "full buffer with exactly full last subbuffer" accounting problem
authorTom Zanussi <tzanussi@gmail.com>
Wed, 6 Aug 2008 00:05:03 +0000 (00:05 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 20 Aug 2008 18:04:59 +0000 (11:04 -0700)
commitd6d033c731bbbdc700913790627968ef26ac29db
tree988253f62fbf1aef29f94123d918da8b71e29d59
parent1d1150e2b56c5e3bd2d3a4dd638764131471f26f
relay: fix "full buffer with exactly full last subbuffer" accounting problem

commit 32194450330be327f3b25bf6b66298bd122599e9 upstream

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: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/relay.c