Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1925835pxb; Fri, 22 Oct 2021 10:11:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDGARlaeiurB2yFpLk2uN+GYwcZr0IT6olWTtIfXaxgLoyfdfQFbWabBkt8RKOudgH5k8M X-Received: by 2002:a17:90b:3886:: with SMTP id mu6mr15965394pjb.40.1634922719215; Fri, 22 Oct 2021 10:11:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634922719; cv=none; d=google.com; s=arc-20160816; b=UHr0Z1GahDOEC8H9Pnx5sPQG6SqiP3jYasmopD2iVzzSGZ6XBq7papGyUDh6KQyDMz p+hiF0vyZtMvYvaEgLd+hQtBRIcPKF4kSf6yf6EBP8dm10mFMdzLYRGh2EMmUMuCdAno xRUx7IDnkA8t+/XPYYfJ1EMVXbRnUHAi614JbN0LtUish1A5BeA5CkmI85DIfMwbksBt j56LNavqukdCdtbal6iEfS93Hzjzb1yeGhrk92tfTChYVT/wDzRXayppXZyehjpKRNBp oj2QE1Z0AbYsD0MlEz7WeX1x0MLMCyOQ2eJY/EG/tG1a4Ch6hzMJ7B7wo0E+G6fhiiU0 Xq0A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=u0LCQ2Q01yFPOa55Zc528lPs7tc3fuvW5Z082KuZArM=; b=wmk4YSZFtb3IVWe78gYcJVKGoDRwbZImlAfvbz0t5BAQ6VRzcCz4MqoQzJcniUqJqH BLcavmlHYrW4yaIhhnOCZADqiYhzYMvlN9ufi+Ro7aLD7GjZagw8viBuq+SHm4qX+zBh cVcbOWsTWQsu6I++vc/5jiddTc8Da7z8c38QfP5nmT8REM81GtO/R/Er/JasVRkJONVy ajInxMVc5B1RY9DQ/dz/WJ+X4W3RQmnLwvUG82mJ3w9KrUhU5Srn+gZ2wPMWQsfeCZZt WirxXuetuiE8eNY5rGtiawsT9Dm7sA/GbrYqjSMvciweyFvMD//Vnyp/8xddlTsj7r0x U/Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=R5L2y2Jw; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f16si13819120pfv.82.2021.10.22.10.11.38; Fri, 22 Oct 2021 10:11:59 -0700 (PDT) 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=20210112 header.b=R5L2y2Jw; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233862AbhJVRNq (ORCPT + 99 others); Fri, 22 Oct 2021 13:13:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233937AbhJVRNe (ORCPT ); Fri, 22 Oct 2021 13:13:34 -0400 Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0111EC061764 for ; Fri, 22 Oct 2021 10:11:17 -0700 (PDT) Received: by mail-qk1-x732.google.com with SMTP id a13so5141410qkg.11 for ; Fri, 22 Oct 2021 10:11:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u0LCQ2Q01yFPOa55Zc528lPs7tc3fuvW5Z082KuZArM=; b=R5L2y2Jw9ZjUM4vNIcylyvs8OJvn0hIGBDEBjRb528FjV7rpRJ4iyhnwg71EDWCHjc k1uAWI1hDEtiUYfRdU24J5UU0sjNQVejT7iCLBW9X8f6h5N7op897u2BQxTnNKAowMe+ vVRd67vd3Fe7vwz7iZreYs1l46JIh9EnMCKmgT66xk0w7pUtIVHT6CT/SfRsA8IrVTCe 0Hz9ZdXGcTX2KIo6XEc0LX9Bt+y3MRaTsJUUo3zPxUedUBlQQqhzmVkTJRWI8QXymETU Q1qvXFXE2RIQul9FIyNxgZKToihi//Gf6CvXvfmzNULc41KRLJCoWC9L2XufOO4L9tSw MjNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=u0LCQ2Q01yFPOa55Zc528lPs7tc3fuvW5Z082KuZArM=; b=yfLOHs0XcIQDXM/vDeBZ/ih/wATckSn9tKoFZq5xhsNTjbEpwdxqAg34DOU+TUMQfK l1kMhmGNrzULXooXvSUc0ImmsBfGBSZ/qHeUYVPwS7ZQAgJ+aUKf16ErRnq4v58rmx/e IdwnzjB77s75NML6uO+hOxujroIPMs/C/xSApXc+nVy1Jcoa07nzz3bO2ScANlnHIU/5 Bp0h10A4JfUDiIZAcVn9nYneCst0wETYN6uKMUkKGIZ/c/Otic9gwqKiW9yPXDMCLr09 dohqkd/8e8GJfMx4JT4NqngTvFUYtot4OeA7sue3spl065BXm0oHXSnvA1cygx9YSSpx h/Xw== X-Gm-Message-State: AOAM531Y/kZD80J68SNjI5Wq6IQ3APqosKisl4SNxp+BXEw/SmODKG2W CmIFFRvy+SHLbNj39NB/gk4= X-Received: by 2002:a05:620a:25c9:: with SMTP id y9mr1101721qko.386.1634922676088; Fri, 22 Oct 2021 10:11:16 -0700 (PDT) Received: from gouda.nowheycreamery.com ([2601:401:100:a3a:aa6d:aaff:fe2e:8a6a]) by smtp.gmail.com with ESMTPSA id s22sm4484586qko.135.2021.10.22.10.11.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Oct 2021 10:11:15 -0700 (PDT) Sender: Anna Schumaker From: schumaker.anna@gmail.com X-Google-Original-From: Anna.Schumaker@Netapp.com To: Trond.Myklebust@hammerspace.com, linux-nfs@vger.kernel.org Cc: Anna.Schumaker@Netapp.com Subject: [PATCH v2 03/14] NFS: Remove the nfs4_label from the nfs4_create_res struct Date: Fri, 22 Oct 2021 13:11:02 -0400 Message-Id: <20211022171113.16739-4-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211022171113.16739-1-Anna.Schumaker@Netapp.com> References: <20211022171113.16739-1-Anna.Schumaker@Netapp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Anna Schumaker Instead, use the label embedded in the attached fattr. Signed-off-by: Anna Schumaker --- fs/nfs/nfs4proc.c | 12 +++++------- fs/nfs/nfs4xdr.c | 2 +- include/linux/nfs_xdr.h | 1 - 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index e1214bb6b7ee..06569a35a6df 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -4851,7 +4851,6 @@ struct nfs4_createdata { struct nfs4_create_res res; struct nfs_fh fh; struct nfs_fattr fattr; - struct nfs4_label *label; }; static struct nfs4_createdata *nfs4_alloc_createdata(struct inode *dir, @@ -4863,8 +4862,8 @@ static struct nfs4_createdata *nfs4_alloc_createdata(struct inode *dir, if (data != NULL) { struct nfs_server *server = NFS_SERVER(dir); - data->label = nfs4_label_alloc(server, GFP_KERNEL); - if (IS_ERR(data->label)) + data->fattr.label = nfs4_label_alloc(server, GFP_KERNEL); + if (IS_ERR(data->fattr.label)) goto out_free; data->msg.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_CREATE]; @@ -4875,12 +4874,11 @@ static struct nfs4_createdata *nfs4_alloc_createdata(struct inode *dir, data->arg.name = name; data->arg.attrs = sattr; data->arg.ftype = ftype; - data->arg.bitmask = nfs4_bitmask(server, data->label); + data->arg.bitmask = nfs4_bitmask(server, data->fattr.label); data->arg.umask = current_umask(); data->res.server = server; data->res.fh = &data->fh; data->res.fattr = &data->fattr; - data->res.label = data->label; nfs_fattr_init(data->res.fattr); } return data; @@ -4902,14 +4900,14 @@ static int nfs4_do_create(struct inode *dir, struct dentry *dentry, struct nfs4_ data->res.fattr->time_start, NFS_INO_INVALID_DATA); spin_unlock(&dir->i_lock); - status = nfs_instantiate(dentry, data->res.fh, data->res.fattr, data->res.label); + status = nfs_instantiate(dentry, data->res.fh, data->res.fattr, data->res.fattr->label); } return status; } static void nfs4_free_createdata(struct nfs4_createdata *data) { - nfs4_label_free(data->label); + nfs4_label_free(data->fattr.label); kfree(data); } diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 466b2832de75..98594a97529d 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -6361,7 +6361,7 @@ static int nfs4_xdr_dec_create(struct rpc_rqst *rqstp, struct xdr_stream *xdr, status = decode_getfh(xdr, res->fh); if (status) goto out; - decode_getfattr_label(xdr, res->fattr, res->label, res->server); + decode_getfattr_label(xdr, res->fattr, res->fattr->label, res->server); out: return status; } diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 9960f6628066..5aba81b74c98 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -1040,7 +1040,6 @@ struct nfs4_create_res { const struct nfs_server * server; struct nfs_fh * fh; struct nfs_fattr * fattr; - struct nfs4_label *label; struct nfs4_change_info dir_cinfo; }; -- 2.33.1