From patchwork Wed Apr 27 19:47:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bryan Schumaker X-Patchwork-Id: 737461 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3RKL4ek017892 for ; Wed, 27 Apr 2011 20:21:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759808Ab1D0TrX (ORCPT ); Wed, 27 Apr 2011 15:47:23 -0400 Received: from mx2.netapp.com ([216.240.18.37]:21819 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759806Ab1D0TrX (ORCPT ); Wed, 27 Apr 2011 15:47:23 -0400 X-IronPort-AV: E=Sophos;i="4.64,275,1301900400"; d="scan'208";a="544136747" Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx2-out.netapp.com with ESMTP; 27 Apr 2011 12:47:23 -0700 Received: from davros.hq.netapp.com (robertmw-lxp.hq.netapp.com [10.30.16.228] (may be forged)) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id p3RJlHpR027445; Wed, 27 Apr 2011 12:47:21 -0700 (PDT) From: bjschuma@netapp.com To: bfields@fieldses.org Cc: linux-nfs@vger.kernel.org, Bryan Schumaker Subject: [PATCH 2/3] NFSD: Check status from nfsd4_map_bcts_dir() Date: Wed, 27 Apr 2011 15:47:15 -0400 Message-Id: <1303933636-22134-2-git-send-email-bjschuma@netapp.com> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1303933636-22134-1-git-send-email-bjschuma@netapp.com> References: <1303933636-22134-1-git-send-email-bjschuma@netapp.com> MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 27 Apr 2011 20:21:05 +0000 (UTC) From: Bryan Schumaker Compiling gave me this warning: fs/nfsd/nfs4state.c: In function ‘nfsd4_bind_conn_to_session’: fs/nfsd/nfs4state.c:1623:9: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] The local variable "status" was being set by nfsd4_map_bcts_dir() and then ignored before calling nfsd4_new_conn(). Signed-off-by: Bryan Schumaker --- fs/nfsd/nfs4state.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 4cf04e1..e00061a 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -1637,8 +1637,9 @@ __be32 nfsd4_bind_conn_to_session(struct svc_rqst *rqstp, return nfserr_badsession; status = nfsd4_map_bcts_dir(&bcts->dir); - nfsd4_new_conn(rqstp, cstate->session, bcts->dir); - return nfs_ok; + if (!status) + nfsd4_new_conn(rqstp, cstate->session, bcts->dir); + return status; } static bool nfsd4_compound_in_session(struct nfsd4_session *session, struct nfs4_sessionid *sid)