Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp158325pxu; Tue, 5 Jan 2021 07:33:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxP/SppgFPotnQJsAfmF0+CFcxlk1u+tMf8Dd7e43i3Wpl0T79XT0RnskkIVvJtT2KsS+lw X-Received: by 2002:a05:6402:7d7:: with SMTP id u23mr248131edy.325.1609860814889; Tue, 05 Jan 2021 07:33:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609860814; cv=none; d=google.com; s=arc-20160816; b=GgjfFNK9Kx9YqsMqrX5Cc3AkA8J/cr2J5ja3uk7BhHFbd5XQKxrg7MpBROJnSqXayC 6VKceV7rD28lOEVwcO7VYat3de3wm33h8P8CT4whs1L2+AAkzdH81EdeRXSzXQe4vw8S 5Mc7PFGuArjQflS1dwyDTDZ6o5m98EmBE2vGWgDDZ+FwFivAGVSFsKT/rlGoA8Y7yQDW DwHRKu2Q8MwKBBx8LXrKIPFOt/pUNaRZNjYpNBhFd9rhv2wG7ppX/9djayH5oJHlajMW H3oCBODoMGkrTc1kc1RriBhGAPa0fOT4U5iTR3yFgsq1ThYwyhF9TcBBcjyuZ/fU4pXu Yf7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:to:from:subject :sender:dkim-signature; bh=0Y8TkPWSG0A5AAw5oQM15pPVLvuUh1CSHPSe4B7fuGA=; b=YRvHwoecXVxmvbibz1szX+74rRuzLPU30mZcmC3Ht2ktTfuzfrs5k04RkDNMx0H4pz x7lEIptRCzVEzLdthvNA7RAxsGeonSHNqKAPfTFpeznIt9b9NP0lgyPgzeacOk3HYnXT 4taPo0XLxegxdNhk8+6EUZFc74tnRWsxGaM8S32qkTkMtRE6Smqdg27qMelu1AheRldB //yNGxAPH7682zXYLlr5T7sBx8WKqtnOjkePHtX2S9mLo4c4Pwx794gn8eo8QJUn8/T0 ZOwrglL3JpussAVaoOUvtHwIERhmuDjqAR9qAAFG5J6Dv2TNIn+MNKfEMuJGIQRIygu5 CILQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=U4lELdMK; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v3si30966602ejx.433.2021.01.05.07.33.14; Tue, 05 Jan 2021 07:33:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=U4lELdMK; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727827AbhAEPbS (ORCPT + 99 others); Tue, 5 Jan 2021 10:31:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727680AbhAEPbS (ORCPT ); Tue, 5 Jan 2021 10:31:18 -0500 Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 005C4C061796 for ; Tue, 5 Jan 2021 07:31:02 -0800 (PST) Received: by mail-qk1-x72d.google.com with SMTP id v126so26712475qkd.11 for ; Tue, 05 Jan 2021 07:31:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=0Y8TkPWSG0A5AAw5oQM15pPVLvuUh1CSHPSe4B7fuGA=; b=U4lELdMKqMjxuhgPD2X2kZAQbLL4hAY7brXDJVUC/im4L6e3fpt+c6l2fStW6NrmXO PtUBDUocpMlfe31xGuTCWBDL/75gzM1jycqIjgnLRwvZOMdiECSdN7YPi4rz8fbcw8J+ SMQVMSEdowcXE/CPiAEPiY0ybFXDGZNyStQl+AGLlZYkFyEyZgmKiSVCkPVcUtVfHNtL rIeqg3jV6ba/Wdnrgh/OtJbvb3Mne3Ag4nqEOhFU9w3LGEh0vL8UClWP66NbucNJViQl Ap/MmB+CHPiNYC5ooi5IgZO74rFkLFpH6Pyy3veCjyC8G8PlbM+NDIX8tNWVKVH+Wlbk lYhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:date:message-id :in-reply-to:references:user-agent:mime-version :content-transfer-encoding; bh=0Y8TkPWSG0A5AAw5oQM15pPVLvuUh1CSHPSe4B7fuGA=; b=nkIQShBEAuNeLjqXk1yuJ05dCvvOECpcZ0P5m4PhZQ8YytZLB4K5Owy+rTRekofPQS XR8C+77aIn/mGiSbDuHBaUcR4SCcNv4nStSwGPSHYbwpCVuBEWjXhSNT2k0bnT92xinI DMNr0YuheHtE+NSGKS6LuJYdUxDYoukvAeVdJp23fBrYJgC6H/nisJn4pl76Fg2CwY6E 759ojJlX88O4b2rJXWFYhdgOWe+K3KNpdJH5n26BUp3KPoOLDmEhPM8jz8QrTGSJGijl E43Jc1Uc7L0ear4zrhHtCywpxcyaTtDMcIJGqRYPuVYtePcolOR5d6XpG+rMt1DUks4N H2XQ== X-Gm-Message-State: AOAM5317DbZsaY1qjKndPUcjwSx3yhUkZSl19byzTG71cW4nPhVh7srt lx4aD4+HVcQ4imYiZokyDFU8ziPAtaw= X-Received: by 2002:a05:620a:528:: with SMTP id h8mr91882qkh.40.1609860661932; Tue, 05 Jan 2021 07:31:01 -0800 (PST) Received: from gateway.1015granger.net (c-68-61-232-219.hsd1.mi.comcast.net. [68.61.232.219]) by smtp.gmail.com with ESMTPSA id n62sm127557qkn.125.2021.01.05.07.31.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jan 2021 07:31:00 -0800 (PST) Sender: Chuck Lever Received: from klimt.1015granger.net (klimt.1015granger.net [192.168.1.55]) by gateway.1015granger.net (8.14.7/8.14.7) with ESMTP id 105FUxPl020865 for ; Tue, 5 Jan 2021 15:30:59 GMT Subject: [PATCH v1 15/42] NFSD: Update the LINK3args decoder to use struct xdr_stream From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Tue, 05 Jan 2021 10:30:59 -0500 Message-ID: <160986065972.5532.14792984567589235354.stgit@klimt.1015granger.net> In-Reply-To: <160986050640.5532.16498408936966394862.stgit@klimt.1015granger.net> References: <160986050640.5532.16498408936966394862.stgit@klimt.1015granger.net> User-Agent: StGit/0.23-29-ga622f1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Signed-off-by: Chuck Lever --- fs/nfsd/nfs3xdr.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c index a5bbf9571821..ba5ec9cdafa1 100644 --- a/fs/nfsd/nfs3xdr.c +++ b/fs/nfsd/nfs3xdr.c @@ -574,14 +574,12 @@ nfs3svc_decode_renameargs(struct svc_rqst *rqstp, __be32 *p) int nfs3svc_decode_linkargs(struct svc_rqst *rqstp, __be32 *p) { + struct xdr_stream *xdr = &rqstp->rq_arg_stream; struct nfsd3_linkargs *args = rqstp->rq_argp; - if (!(p = decode_fh(p, &args->ffh)) - || !(p = decode_fh(p, &args->tfh)) - || !(p = decode_filename(p, &args->tname, &args->tlen))) - return 0; - - return xdr_argsize_check(rqstp, p); + return svcxdr_decode_nfs_fh3(xdr, &args->ffh) && + svcxdr_decode_diropargs3(xdr, &args->tfh, + &args->tname, &args->tlen); } int