From: zhengbin <zhengbin13@huawei.com>
To: <bfields@fieldses.org>, <chuck.lever@oracle.com>,
<linux-nfs@vger.kernel.org>
Cc: <zhengbin13@huawei.com>
Subject: [PATCH 3/3] nfsd: use true,false for bool variable in nfssvc.c
Date: Wed, 25 Dec 2019 11:19:36 +0800 [thread overview]
Message-ID: <1577243976-46389-4-git-send-email-zhengbin13@huawei.com> (raw)
In-Reply-To: <1577243976-46389-1-git-send-email-zhengbin13@huawei.com>
Fixes coccicheck warning:
fs/nfsd/nfssvc.c:394:2-14: WARNING: Assignment of 0/1 to bool variable
fs/nfsd/nfssvc.c:407:2-14: WARNING: Assignment of 0/1 to bool variable
fs/nfsd/nfssvc.c:422:2-14: WARNING: Assignment of 0/1 to bool variable
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
fs/nfsd/nfssvc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index e8bee8f..decfda0 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -391,7 +391,7 @@ static int nfsd_startup_net(int nrservs, struct net *net, const struct cred *cre
ret = lockd_up(net, cred);
if (ret)
goto out_socks;
- nn->lockd_up = 1;
+ nn->lockd_up = true;
}
ret = nfs4_state_start_net(net);
@@ -404,7 +404,7 @@ static int nfsd_startup_net(int nrservs, struct net *net, const struct cred *cre
out_lockd:
if (nn->lockd_up) {
lockd_down(net);
- nn->lockd_up = 0;
+ nn->lockd_up = false;
}
out_socks:
nfsd_shutdown_generic();
@@ -419,7 +419,7 @@ static void nfsd_shutdown_net(struct net *net)
nfs4_state_shutdown_net(net);
if (nn->lockd_up) {
lockd_down(net);
- nn->lockd_up = 0;
+ nn->lockd_up = false;
}
nn->nfsd_net_up = false;
nfsd_shutdown_generic();
--
2.7.4
next prev parent reply other threads:[~2019-12-25 3:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-25 3:19 [PATCH 0/3] nfsd: use true,false for bool variable zhengbin
2019-12-25 3:19 ` [PATCH 1/3] nfsd: use true,false for bool variable in vfs.c zhengbin
2019-12-25 3:19 ` [PATCH 2/3] nfsd: use true,false for bool variable in nfs4proc.c zhengbin
2019-12-25 3:19 ` zhengbin [this message]
2020-01-03 16:23 ` [PATCH 0/3] nfsd: use true,false for bool variable 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=1577243976-46389-4-git-send-email-zhengbin13@huawei.com \
--to=zhengbin13@huawei.com \
--cc=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.