]> Gentwo Git Trees - linux/.git/commit
nfsd: Eliminate an allocation in nfs4_make_rec_clidname()
authorEric Biggers <ebiggers@kernel.org>
Mon, 4 Aug 2025 22:47:00 +0000 (22:47 +0000)
committerChuck Lever <chuck.lever@oracle.com>
Sun, 21 Sep 2025 23:24:50 +0000 (19:24 -0400)
commit9ebcd022a34388bd3c37c6a11c1a9d49d5394eb2
treee2634c2a9bb7b1e9cd4374744adb2ee427d6b66a
parent17695d72d0b192bb471a699483dd6c6c2576c57d
nfsd: Eliminate an allocation in nfs4_make_rec_clidname()

Since MD5 digests are fixed-size, make nfs4_make_rec_clidname() store
the digest in a stack buffer instead of a dynamically allocated buffer.
Use MD5_DIGEST_SIZE instead of a hard-coded value, both in
nfs4_make_rec_clidname() and in the definition of HEXDIR_LEN.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4recover.c
fs/nfsd/state.h