]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
lockd: Remove unnecessary memset()
authorChuck Lever <chuck.lever@oracle.com>
Thu, 17 Oct 2024 13:36:28 +0000 (09:36 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Tue, 19 Nov 2024 01:23:03 +0000 (20:23 -0500)
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().

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/lockd/xdr4.c

index 3d28b9c3ed1509a262cff891f0e1630791b9fcba..60466b8bac58833344c4a68988f2f5b5ac587efd 100644 (file)
@@ -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;