dect
/
linux-2.6
Archived
13
0
Fork 0

[TCP]: Fix TCP_OFF() bug check introduced by previous change.

The TCP_OFF assignment at the bottom of that if block can indeed set
TCP_OFF without setting TCP_PAGE.  Since there is not much to be
gained from avoiding this situation, we might as well just zap the
offset.  The following patch should fix it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Herbert Xu 2005-09-05 18:55:48 -07:00 committed by David S. Miller
parent 1198ad002a
commit fb5f5e6e0c
1 changed files with 2 additions and 2 deletions

View File

@ -769,10 +769,10 @@ new_segment:
if (off == PAGE_SIZE) {
put_page(page);
TCP_PAGE(sk) = page = NULL;
TCP_OFF(sk) = off = 0;
off = 0;
}
} else
BUG_ON(off);
off = 0;
if (copy > PAGE_SIZE - off)
copy = PAGE_SIZE - off;