Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4048063ybv; Mon, 10 Feb 2020 11:16:27 -0800 (PST) X-Google-Smtp-Source: APXvYqwKC/0G9z4MmcvXsONXbIu93BpRUV42Zs1eHFrPMhvyG8QIG8rPtf01WRdgo9sk04/251tf X-Received: by 2002:a9d:75da:: with SMTP id c26mr2237675otl.40.1581362187171; Mon, 10 Feb 2020 11:16:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581362187; cv=none; d=google.com; s=arc-20160816; b=eCxuOBHrVwfNK1NHByjPLJDn07S1A3vIyAC+JKZUwkgdekWIMFEYAuH9o66q268j6o tXAzDaWWCBEqptHLUGiUgvNjkKAp9yViPAbQPIBXXxv15bHzzWHpBUbp322dstsNOuax 48R+V/HoXV5yttvkXN5EcKTUF4FuvKEBZyQw/DZ1yRAhkE1WEjlZruWZ7U2NMd2lBazg iBGYNu6kUsEcTKAaI7eBV+TPMVKglo3Y+szXeYFjlVHvfzgFYRB/4ejyF6vjq9u5LVWS 0syC1MiuXVGU6SVE7BQ7j8FkNKaClwn3x3NNihV1BtBTqT1nspQBdiGAL4DZWBYRsz81 sx7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=OMqptcmVRzEg42M/Hggynq9yT5bF0SzCr+29ph874gs=; b=X3dVkEx8V9DQuwfpcewtAAkwN1wFbIeTalf98ZJzfdRiqHbj6HYZXgWgITQeFp7A7M V+wzI+N+UNfvJpAvcaMn7MogHp5sL8/rl38PLf/FCKhyH/nbpdozUb6zpqAP1tfU07nJ Y4AMAONvTqH8xhcuddCOwiZK+7Ft6M/heBng88PBBuTlt8oce19Vd91JQtsola8Na2ML wF8VSGJPjPGMaXOi4yvlEaNRsK/Fq+CKhLL1cyS6xu6W6xflnoCj8BMVO75+QtKT8Jsu Gpp05F6bK1pLgV5kZhlnFPhiJYVHPgNgOM/P5koIpvuM5NvNtJ+VcsuV/I209umMG03Y JBoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WtHiTNJU; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id h21si622681otr.235.2020.02.10.11.16.16; Mon, 10 Feb 2020 11:16:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WtHiTNJU; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 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 S1727433AbgBJTQK (ORCPT + 99 others); Mon, 10 Feb 2020 14:16:10 -0500 Received: from mail-yb1-f194.google.com ([209.85.219.194]:33598 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727029AbgBJTQJ (ORCPT ); Mon, 10 Feb 2020 14:16:09 -0500 Received: by mail-yb1-f194.google.com with SMTP id s35so4114043ybi.0 for ; Mon, 10 Feb 2020 11:16:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=OMqptcmVRzEg42M/Hggynq9yT5bF0SzCr+29ph874gs=; b=WtHiTNJUUYm2HOKw903oyXMskaymXXDRO+BgikK+fDWnDwBQmx62+aS/meJ7QyvhYt Polkexse58XqBG9iEouFX//dYxFaJusjmF1muyM0i6YzSDUvrXzQ1HO0S5IkwHBRR/Lz tNu+p8ygigSmW/6KAhd1J3/EG37Wp8VRrA9vl/dUyunhgZZl52an7otRZxGu+nTPkXJj eZ3rwy7f0uBq+SYvahbJ3CZRoIq9Kq8kAUZDOEVwxOsfU6/qkycJ/n0l4a8rUjbeL1rM AV7+xujds8DQ1BtYRfx08rpcdFs130UZJnIjVwqzqG13T6rD6K0a9atuYtZCxNzv3/LG A+fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OMqptcmVRzEg42M/Hggynq9yT5bF0SzCr+29ph874gs=; b=V+8nqUnZpg4fEL2b30cjhL+QOPAa3SKcMRaAiM+ckvfvt8ZopBbeY2mTfNIj25/4ML XnjpjTs1y9gLDWUAnrrL1yj0q8pIYREPsAmRQYHpKxxoSq1cTi1joaCCvaUoj8X1/h6I xwJ62LCu7iJtg9NwDasCsp4cvwESzjQK4tNQW+ieGexlm52y41SEkDmszgckz6s3BEef FQwhSshV+K1TC+I2wsrz/U+pgPlRKUi6Y7hPBc6n48jFRvAD2c8igRwELN8tUYq5XiLy np2ZuLhZ1Rb6+r6urH4hw0cSvltCi2Pgy20kwnla9o/eysOm7Ulc/dfDMthXNAblmHZg BSZQ== X-Gm-Message-State: APjAAAW8AbfacCAfLm65UQpz+SMbGA0Ti0q9Eydqckgk1pGDfiGTOY5i YdMQPG6CnGHiSb9e2eZ+1bpTPk8upg== X-Received: by 2002:a25:cb90:: with SMTP id b138mr2770485ybg.128.1581362168661; Mon, 10 Feb 2020 11:16:08 -0800 (PST) Received: from localhost.localdomain (c-68-40-189-247.hsd1.mi.comcast.net. [68.40.189.247]) by smtp.gmail.com with ESMTPSA id o4sm660222ywd.5.2020.02.10.11.16.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Feb 2020 11:16:08 -0800 (PST) From: Trond Myklebust X-Google-Original-From: Trond Myklebust To: linux-nfs@vger.kernel.org Subject: [PATCH 4/8] NFS: Assume cred is pinned by open context in I/O requests Date: Mon, 10 Feb 2020 14:13:41 -0500 Message-Id: <20200210191345.557460-5-trond.myklebust@hammerspace.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200210191345.557460-4-trond.myklebust@hammerspace.com> References: <20200210191345.557460-1-trond.myklebust@hammerspace.com> <20200210191345.557460-2-trond.myklebust@hammerspace.com> <20200210191345.557460-3-trond.myklebust@hammerspace.com> <20200210191345.557460-4-trond.myklebust@hammerspace.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org In read/write/commit, we should be able to assume that the cred is pinned by the open context. Signed-off-by: Trond Myklebust --- fs/nfs/pagelist.c | 2 +- fs/nfs/write.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 20b3717cd7ca..c9c3edefc5be 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c @@ -627,7 +627,7 @@ int nfs_initiate_pgio(struct rpc_clnt *clnt, struct nfs_pgio_header *hdr, .callback_ops = call_ops, .callback_data = hdr, .workqueue = nfsiod_workqueue, - .flags = RPC_TASK_ASYNC | flags, + .flags = RPC_TASK_ASYNC | RPC_TASK_CRED_NOREF | flags, }; int ret = 0; diff --git a/fs/nfs/write.c b/fs/nfs/write.c index c478b772cc49..5544ee6cfda8 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1707,7 +1707,7 @@ int nfs_initiate_commit(struct rpc_clnt *clnt, struct nfs_commit_data *data, .callback_ops = call_ops, .callback_data = data, .workqueue = nfsiod_workqueue, - .flags = RPC_TASK_ASYNC | flags, + .flags = RPC_TASK_ASYNC | RPC_TASK_CRED_NOREF | flags, .priority = priority, }; /* Set up the initial task struct. */ -- 2.24.1