]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
NFSD: Replace READ* macros in nfsd4_decode_link()
authorChuck Lever <chuck.lever@oracle.com>
Wed, 4 Nov 2020 20:01:24 +0000 (15:01 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Jun 2024 12:52:36 +0000 (14:52 +0200)
[ Upstream commit 5c505d128691c70991b766dd6a3faf49fa59ecfb ]

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/nfs4xdr.c

index 70ce48340c1b781b41030e27d584d8f5b6468d08..4596b8cef222c2d3fe75a19de0a44d96799c1c6b 100644 (file)
@@ -779,16 +779,7 @@ nfsd4_decode_getattr(struct nfsd4_compoundargs *argp, struct nfsd4_getattr *geta
 static __be32
 nfsd4_decode_link(struct nfsd4_compoundargs *argp, struct nfsd4_link *link)
 {
-       DECODE_HEAD;
-
-       READ_BUF(4);
-       link->li_namelen = be32_to_cpup(p++);
-       READ_BUF(link->li_namelen);
-       SAVEMEM(link->li_name, link->li_namelen);
-       if ((status = check_filename(link->li_name, link->li_namelen)))
-               return status;
-
-       DECODE_TAIL;
+       return nfsd4_decode_component4(argp, &link->li_name, &link->li_namelen);
 }
 
 static __be32