linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislav Kinsbursky <skinsbursky@parallels.com>
To: bfields@fieldses.org
Cc: linux-nfs@vger.kernel.org, Trond.Myklebust@netapp.com,
	linux-kernel@vger.kernel.org, devel@openvz.org
Subject: [PATCH] nfsd: check client tracker initialization result
Date: Thu, 28 Feb 2013 15:09:59 +0300	[thread overview]
Message-ID: <20130228120959.6764.17787.stgit@localhost.localdomain> (raw)

Function nfsd4_client_tracking_init() can return error.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
---
 fs/nfsd/nfs4state.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

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: */


             reply	other threads:[~2013-02-28 12:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-28 12:09 Stanislav Kinsbursky [this message]
2013-03-05 21:20 ` [PATCH] nfsd: check client tracker initialization result J. Bruce Fields
2013-03-06  5:06   ` Stanislav Kinsbursky
2013-03-06  6:18     ` [Devel] " Stanislav Kinsbursky
2013-03-06 14:40       ` J. Bruce Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130228120959.6764.17787.stgit@localhost.localdomain \
    --to=skinsbursky@parallels.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=bfields@fieldses.org \
    --cc=devel@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).