Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp159025pxu; Tue, 5 Jan 2021 07:34:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwzGXwNrH9m2EzNvy4qCozm9wMJkteF7kEnjhcos2+oEOy0Y8qUDT2W3IKkE/eJRJAvzbTe X-Received: by 2002:a17:907:206a:: with SMTP id qp10mr72376866ejb.432.1609860863520; Tue, 05 Jan 2021 07:34:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609860863; cv=none; d=google.com; s=arc-20160816; b=LE2x6Qms4abryBDGt7dgdoLjBY+t7YFgZKRBVXITgBIU/ifvKALX3s6P3333Muxpzi qvsYo+dviIMY7x1ca0DrKGe/2YfLN0dhC2dsv/34vc4jD8ACOQ9uMOuKfrnCqNT52id3 +l4gst7Iotxw1vQLAUlW/X25vX8JURylxEiASaPcGutHcTBZDH/QJoGGUcr143VRV5JO H8s/L0cxErGniYCwZKint62t+ZPMMyBRUn9SkvOr7X8B5zpXwWqjGZ+Xrj7dK0XEPMM6 Noiqlgww6NxaoIAhu5gANXU8B4H7DoLKpO5IfDJtxBsvuniP7MzaPFU1IT9fyYS9n/X9 kEiQ== 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=S8lZyaF5q5GnNU8MedRayrJcC/pOoyE3fWkHFZYR7QA=; b=Z1txFYTixR/2QuJuBEs/H3jIUupOqq1M9JgOj9kA17/vBy8u7RDD0KPlxjy1K7/f7w +qQbKPKaYBwAH2SlOHcOgJy5MN+2eT7Y0k+4SJDZyvGM0pPW9yb152HaNdiKZokHGGCh /3Ql8duHA2rsUR9sc5zPo4fiOyKtuyhHmCr68kU/9uzslMTe9A21eNNiP5I8Z9RAXPuN o8wdNiaQQXT6OZ0VcDBUBz/oruGkjTtO/wiopcNqkunOs1yUiYNb4diRmHcqLBubNAbk BsKoSoKEVKdonBGBdODlGEJrPkW5wYfUdaWEEGz/YJa9CCIqSH2iaWlATtnYvOA1Kzav vxCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AGV68fj5; 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 ca10si32129036edb.435.2021.01.05.07.34.04; Tue, 05 Jan 2021 07:34:23 -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=AGV68fj5; 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 S1727307AbhAEPdI (ORCPT + 99 others); Tue, 5 Jan 2021 10:33:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728060AbhAEPdH (ORCPT ); Tue, 5 Jan 2021 10:33:07 -0500 Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFA2BC061795 for ; Tue, 5 Jan 2021 07:32:26 -0800 (PST) Received: by mail-qt1-x832.google.com with SMTP id z20so21056735qtq.3 for ; Tue, 05 Jan 2021 07:32:26 -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=S8lZyaF5q5GnNU8MedRayrJcC/pOoyE3fWkHFZYR7QA=; b=AGV68fj5R91xRVwKOLSobRdbcYOa7CanOh2acQJX1UW9AHuz2RbiLTTFok7JkDPOpl zYLOUaomO6w/tMtVY2PSJvXm+evBWrbkzVJ4fIOM5SauNXYJ73jz9LOSCsN6aNdLLXkr gyVnQsuI/8IHbVbRw3keEFyfrF/ssfLEH7igGqO3OVbRvA4ItWsIgWlmSMWRbADvKMbb 56nG2Tu0d0W6qclHpK3tIjuYFE+1zEvvwVGL+XozBiXhXxaJ3g58vK5OTI8x+T9Tim/s 2KPk0riQl4O85R7l0hj0YmscGHngKyrWp0GdnXKoYlZ6eEBRifLkkGQFSKfvzINZfjaP +pCg== 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=S8lZyaF5q5GnNU8MedRayrJcC/pOoyE3fWkHFZYR7QA=; b=Y1PcIfOnJyElppi4bBg9JRl2nAmcK9KbDIq9op9IBpG6Q0lO3uWa1Q18WtCxtyA3IO tTiil4E6+LD8iv9mTKusp9jyz7nCAUz7qUNZq/t0VUj6yTr4figzsWDXLjsSOtja5E90 v9HvSUzT21eCsPHbnQS8zvqCVgDdqmTmgaNBs4N700Fkj322yn2ckE2YkQcGEDt9N34G ZpCExjt8iFEhsYSRGOjsOOZmOriXkWML3TAC3BF8nX4yyGqaI1hgr1qic+4dZCQ0apaX PWFMpnC2cujMWUODPrDjmxdH+MQNOSPpCxYYQVNzXNKPEkn/NB7ViKwPMbfVOEzJZBaK /iRQ== X-Gm-Message-State: AOAM532P+dt1lZ/S/fNJZ1sGMrzprHhmU2gpz4gHeZK+VRWj0XSrh+vB W3geBsNVlXaZBLbhLMB6h8JpMRa+Zj8= X-Received: by 2002:ac8:7510:: with SMTP id u16mr32285qtq.139.1609860745916; Tue, 05 Jan 2021 07:32:25 -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 j142sm133879qke.117.2021.01.05.07.32.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jan 2021 07:32:25 -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 105FWOlW020913 for ; Tue, 5 Jan 2021 15:32:24 GMT Subject: [PATCH v1 31/42] NFSD: Update the NFSv2 CREATE argument decoder to use struct xdr_stream From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Tue, 05 Jan 2021 10:32:24 -0500 Message-ID: <160986074438.5532.3292569454405268867.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/nfsxdr.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/fs/nfsd/nfsxdr.c b/fs/nfsd/nfsxdr.c index 6c87ea8f3876..2e2806cbe7b8 100644 --- a/fs/nfsd/nfsxdr.c +++ b/fs/nfsd/nfsxdr.c @@ -401,14 +401,12 @@ nfssvc_decode_writeargs(struct svc_rqst *rqstp, __be32 *p) int nfssvc_decode_createargs(struct svc_rqst *rqstp, __be32 *p) { + struct xdr_stream *xdr = &rqstp->rq_arg_stream; struct nfsd_createargs *args = rqstp->rq_argp; - if ( !(p = decode_fh(p, &args->fh)) - || !(p = decode_filename(p, &args->name, &args->len))) - return 0; - p = decode_sattr(p, &args->attrs, nfsd_user_namespace(rqstp)); - - return xdr_argsize_check(rqstp, p); + return svcxdr_decode_diropargs(xdr, &args->fh, + &args->name, &args->len) && + svcxdr_decode_sattr(rqstp, xdr, &args->attrs); } int