unused label (was: Re: If xdr_kmap() fails, we need to ensure that it unmaps all the pages, and returns)
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 unused label (was: Re: If xdr_kmap() fails, we need to ensure that it unmaps all the pages, and returns)
Quoted 19 lines · Linux Kernel Mailing List
ChangeSet 1.1019.1.22, 2003/07/30 01:54:20+02:00, [email protected]
If
xdr_kmap()fails, we need to ensure that it unmaps all the pages, and returns
0. We don't want to be sending partial RPC requests to the server.diff -Nru
a/net/sunrpc/xdr.cb/net/sunrpc/xdr.cnet/sunrpc/xdr.c +1
-3@@ -203,16 +204,15 @@ ppage += base >>PAGE_CACHE_SHIFT ; base &= ~PAGE_CACHE_MASK ; } - first_kmap =1 ; do { len = PAGE_CACHE_SIZE; - if (first_kmap) { - first_kmap = 0; + if (!first_kmap) {
net/sunrpc/xdr.c line 218
Quoted 10 lines
net/sunrpc/xdr.c +2
-1+ first_kmap = ppage; iov->iov_base =kmap (*ppage); }else { iov->iov_base =kmap_nonblock (*ppage);if (!iov->iov_base) - goto out; + goto out_err; }if (base) { iov->iov_base += base;
After this change the label `out' becomes unused, causing a compile warning. Here's a fix:
net/sunrpc/xdr.c renamed from net/sunrpc/xdr.c.orig +0 -1
@@ -231,7 +231,6 @@ iov->iov_base = (char *)xdr->tail[0 ].iov_base + base; iov++; } - out:return (iov - iov_base); out_err:for (; first_kmap != ppage; first_kmap++)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds