From: cel@kernel.org
To: Neil Brown <neilb@suse.de>, Jeff Layton <jlayton@kernel.org>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <dai.ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: <linux-nfs@vger.kernel.org>, Chuck Lever <chuck.lever@oracle.com>
Subject: [PATCH 2/5] lockd: Remove unnecessary memset()
Date: Thu, 17 Oct 2024 09:36:28 -0400 [thread overview]
Message-ID: <20241017133631.213274-3-cel@kernel.org> (raw)
In-Reply-To: <20241017133631.213274-1-cel@kernel.org>
From: Chuck Lever <chuck.lever@oracle.com>
Since commit 103cc1fafee4 ("SUNRPC: Parametrize how much of argsize
should be zeroed") (and possibly long before that, even) all of the
memory underlying rqstp->rq_argp is zeroed already. There's no need
for the memset() in nlm4svc_decode_shareargs().
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
fs/lockd/xdr4.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/lockd/xdr4.c b/fs/lockd/xdr4.c
index 3d28b9c3ed15..60466b8bac58 100644
--- a/fs/lockd/xdr4.c
+++ b/fs/lockd/xdr4.c
@@ -268,7 +268,6 @@ nlm4svc_decode_shareargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
struct nlm_args *argp = rqstp->rq_argp;
struct nlm_lock *lock = &argp->lock;
- memset(lock, 0, sizeof(*lock));
locks_init_lock(&lock->fl);
lock->svid = ~(u32)0;
--
2.46.2
next prev parent reply other threads:[~2024-10-17 13:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-17 13:36 [PATCH 0/5] Simple lockd clean-ups cel
2024-10-17 13:36 ` [PATCH 1/5] lockd: Remove unused typedef cel
2024-10-17 13:36 ` cel [this message]
2024-10-17 13:36 ` [PATCH 3/5] lockd: Remove some snippets of unfinished code cel
2024-10-17 13:36 ` [PATCH 4/5] lockd: Remove unused parameter to nlmsvc_testlock() cel
2024-10-17 21:06 ` NeilBrown
2024-10-17 13:36 ` [PATCH 5/5] lockd: Remove unneeded initialization of file_lock::c.flc_flags cel
2024-10-17 19:13 ` Jeff Layton
2024-10-17 19:16 ` Chuck Lever III
2024-10-17 19:30 ` Jeff Layton
2024-10-17 21:22 ` NeilBrown
2024-10-17 21:34 ` Chuck Lever
2024-10-17 20:56 ` NeilBrown
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=20241017133631.213274-3-cel@kernel.org \
--to=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=dai.ngo@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=okorniev@redhat.com \
--cc=tom@talpey.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 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.