Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755840Ab1CNMrh (ORCPT ); Mon, 14 Mar 2011 08:47:37 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:39597 "EHLO rcsinet10.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755791Ab1CNMrf convert rfc822-to-8bit (ORCPT ); Mon, 14 Mar 2011 08:47:35 -0400 Subject: Re: [PATCH] SUNRPC: svc_register error overwritten in next iteration Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Chuck Lever In-Reply-To: <4D7B74C7.7060506@gmail.com> Date: Mon, 14 Mar 2011 08:47:18 -0400 Cc: "J. Bruce Fields" , Neil Brown , linux-nfs@vger.kernel.org, Andrew Morton , LKML Content-Transfer-Encoding: 8BIT Message-Id: References: <4D7B74C7.7060506@gmail.com> To: roel X-Mailer: Apple Mail (2.1082) X-Source-IP: acsmt357.oracle.com [141.146.40.157] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090202.4D7E0E59.012B,ss=1,fgs=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1013 Lines: 41 On Mar 12, 2011, at 8:27 AM, roel wrote: > 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 > --- > net/sunrpc/svc.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > Is this needed? Maybe. Did you encounter a problem here? > 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; -- Chuck Lever chuck[dot]lever[at]oracle[dot]com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/