From patchwork Thu Feb 28 12:09:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Kinsbursky X-Patchwork-Id: 2197181 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 7220E3FCF6 for ; Thu, 28 Feb 2013 12:09:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752729Ab3B1MJH (ORCPT ); Thu, 28 Feb 2013 07:09:07 -0500 Received: from mailhub.sw.ru ([195.214.232.25]:43805 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752040Ab3B1MJH (ORCPT ); Thu, 28 Feb 2013 07:09:07 -0500 Received: from localhost.localdomain ([10.30.21.131]) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id r1SC8g3D019232; Thu, 28 Feb 2013 16:08:43 +0400 (MSK) Subject: [PATCH] nfsd: check client tracker initialization result To: bfields@fieldses.org From: Stanislav Kinsbursky Cc: linux-nfs@vger.kernel.org, Trond.Myklebust@netapp.com, linux-kernel@vger.kernel.org, devel@openvz.org Date: Thu, 28 Feb 2013 15:09:59 +0300 Message-ID: <20130228120959.6764.17787.stgit@localhost.localdomain> User-Agent: StGit/0.16 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Function nfsd4_client_tracking_init() can return error. Signed-off-by: Stanislav Kinsbursky --- fs/nfsd/nfs4state.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index f194f86..fc4b81b 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -69,6 +69,7 @@ static u64 current_sessionid = 1; /* forward declarations */ static int check_for_locks(struct nfs4_file *filp, struct nfs4_lockowner *lowner); +void nfs4_state_shutdown_net(struct net *net); /* Locking: */ @@ -4942,7 +4943,9 @@ nfs4_state_start_net(struct net *net) ret = nfs4_state_create_net(net); if (ret) return ret; - nfsd4_client_tracking_init(net); + ret = nfsd4_client_tracking_init(net); + if (ret) + goto out_tracking; nn->boot_time = get_seconds(); locks_start_grace(net, &nn->nfsd4_manager); nn->grace_ended = false; @@ -4950,6 +4953,10 @@ nfs4_state_start_net(struct net *net) nn->nfsd4_grace, net); queue_delayed_work(laundry_wq, &nn->laundromat_work, nn->nfsd4_grace * HZ); return 0; + +out_tracking: + nfs4_state_destroy_net(net); + return ret; } /* initialization to perform when the nfsd service is started: */