From: Kinglong Mee <kinglongmee@gmail.com>
To: "J. Bruce Fields" <bfields@fieldses.org>, linux-nfs@vger.kernel.org
Cc: Trond Myklebust <trond.myklebust@primarydata.com>,
Kinglong Mee <kinglongmee@gmail.com>
Subject: [PATCH 1/7] sunrpc: error out if register_shrinker fail
Date: Tue, 7 Feb 2017 21:46:39 +0800 [thread overview]
Message-ID: <03bfbff3-958a-0ae9-fbd9-1eba53fa1735@gmail.com> (raw)
In-Reply-To: <59432847-8e45-4423-c441-0c67ee645f38@gmail.com>
register_shrinker may return error when register fail, error out.
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
---
net/sunrpc/auth.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
index a7d03ea..4aa6ef1 100644
--- a/net/sunrpc/auth.c
+++ b/net/sunrpc/auth.c
@@ -873,8 +873,12 @@ int __init rpcauth_init_module(void)
err = rpc_init_generic_auth();
if (err < 0)
goto out2;
- register_shrinker(&rpc_cred_shrinker);
+ err = register_shrinker(&rpc_cred_shrinker);
+ if (err < 0)
+ goto out3;
return 0;
+out3:
+ rpc_destroy_generic_auth();
out2:
rpc_destroy_authunix();
out1:
--
2.9.3
next prev parent reply other threads:[~2017-02-07 13:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 13:44 [PATCH 0/7] Some cleanups and updates for sunrpc Kinglong Mee
2017-02-07 13:46 ` Kinglong Mee [this message]
2017-02-07 13:47 ` [PATCH 2/7] sunrpc/nfs: cleanup procfs/pipefs entry in cache_detail Kinglong Mee
2017-02-07 13:48 ` [PATCH 3/7] sunrpc: rename NFS_NGROUPS to UNX_NGROUPS for auth unix Kinglong Mee
2017-02-07 13:48 ` [PATCH 4/7] sunrpc: remove dead codes of cr_magic in rpc_cred Kinglong Mee
2017-02-07 13:49 ` [PATCH 5/7] sunrpc: update the comments of sunrpc proc path Kinglong Mee
2017-02-07 13:49 ` [PATCH 6/7] sunrpc: record rpc client pointer in seq->private directly Kinglong Mee
2017-02-07 13:50 ` [PATCH 7/7] sunrpc: use simple_read_from_buffer for reading cache flush Kinglong Mee
2017-02-17 17:03 ` [PATCH 0/7] Some cleanups and updates for sunrpc J. Bruce Fields
2017-02-17 17:25 ` Trond Myklebust
2017-02-17 19:09 ` bfields
2017-02-17 21:15 ` Anna Schumaker
2017-02-17 21:26 ` bfields
2017-02-17 22:18 ` Trond Myklebust
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=03bfbff3-958a-0ae9-fbd9-1eba53fa1735@gmail.com \
--to=kinglongmee@gmail.com \
--cc=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@primarydata.com \
/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).