public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] SUNRPC: svc_register error overwritten in next iteration
@ 2011-03-12 13:27 roel
  2011-03-14 12:47 ` Chuck Lever
  2011-03-14 22:36 ` J. Bruce Fields
  0 siblings, 2 replies; 8+ messages in thread
From: roel @ 2011-03-12 13:27 UTC (permalink / raw)
  To: J. Bruce Fields, Neil Brown, linux-nfs, Andrew Morton, LKML

The break is in the inner loop, the svc_register() error is overwritten
in the next iteration. Only the error in the last iteration is returned.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
 net/sunrpc/svc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Is this needed?

diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 08e05a8..5fd08c0 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -889,6 +889,8 @@ int svc_register(const struct svc_serv *serv, const int family,
 			if (error < 0)
 				break;
 		}
+		if (error < 0)
+			break;
 	}
 
 	return error;

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-03-15 21:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-12 13:27 [PATCH] SUNRPC: svc_register error overwritten in next iteration roel
2011-03-14 12:47 ` Chuck Lever
2011-03-14 22:36 ` J. Bruce Fields
2011-03-15 15:43   ` Chuck Lever
2011-03-15 16:13     ` J. Bruce Fields
2011-03-15 16:54       ` Chuck Lever
2011-03-15 16:57         ` J. Bruce Fields
2011-03-15 21:34           ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox