]> www.infradead.org Git - users/dwmw2/linux.git/commit
NFSD: Optimize nfsd4_encode_fattr()
authorChuck Lever <chuck.lever@oracle.com>
Fri, 22 Jul 2022 20:08:45 +0000 (16:08 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:19:12 +0000 (16:19 +0200)
commit3e7adac61db2f759d89678746481f03b57e543a7
tree65ad1f733ee03d6c0920d3e81e7ec49554f317d5
parent0d6c82286ddf6d72ba429e9f792fd0a2f60aef82
NFSD: Optimize nfsd4_encode_fattr()

[ Upstream commit ab04de60ae1cc64ae16b77feae795311b97720c7 ]

write_bytes_to_xdr_buf() is a generic way to place a variable-length
data item in an already-reserved spot in the encoding buffer.

However, it is costly. In nfsd4_encode_fattr(), it is unnecessary
because the data item is fixed in size and the buffer destination
address is always word-aligned.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4xdr.c