Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3118054ybl; Mon, 19 Aug 2019 12:30:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOe4OhyzdcCS6rrRlpq+PeYJbJ4bR6R21LmJXvtgjn7WB0QzVSi/p8uJD2LynGnu1bwt00 X-Received: by 2002:a65:610a:: with SMTP id z10mr21653753pgu.178.1566243042750; Mon, 19 Aug 2019 12:30:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566243042; cv=none; d=google.com; s=arc-20160816; b=CI21cfKLFzOGOpluPvgenP78TyXCGzoiw8U7nfzrcEzXystsFfNh3FaPBVoEI5HSvH FSuBX/AvK4FgB8GT2tz3WlPisVjhHPCn5Y3lDxmV4+TfsTaSc0taxJthPekHeD7LgAF3 FXgJhyI7OyZTsKobUvJyUJQ/2blPRudHXGuDnc3MOpvsrWb69kpyf+Gqag9bVQdub5bV KurftjyLpdbpVQLOWeTF3T4Zt6Wg+gZuTLNthYem9t/s6RzsBnyRJRwBtXMtyjFGCM1V g/YM2oUUslVud0rhq+s3yEBwU9zw1km3BWBJOAopR0jiqFTEeCRmrdrNX/d0h3HFdLbu uKXA== 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:cc:to:from :dkim-signature; bh=+O0L4th40lZfUVO9h1Mje9KCwXPgIa9fuj6EJ2cZs+8=; b=l1diUk+UlYOZePyphZa9romS8aWasZyaq7jHIcepZ8W031Pdv2hyowen8wjBK/ha2r 8DcL6AB8hfv1cW84w4nJ8Ybl9BeMoM1pq7PgGRkZhjRNSnGnhvyT8tN+Ug0CQTEBwarh 9yE4Ez392iQ7+5SSUAYMm5Mhv+TffClcutng32NWkc7wa6sahi+niVgS1rKXYMUF6NwU ug10IKMDhUFE2gTtIo3oCgGWLJNc2Oov+535BSWnWBqA80WXEvLmvbir+wdCe8sKSxFn So0mduVvrPN1ec33pubM6F5TQ15uatDUdJ8DZeonahzPrhgBTXDhms1LB+oh9GrS2344 Nmqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Btr9ix3b; 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=fail (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 q11si7112013pgk.194.2019.08.19.12.30.28; Mon, 19 Aug 2019 12:30:42 -0700 (PDT) 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=fail header.i=@gmail.com header.s=20161025 header.b=Btr9ix3b; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728429AbfHST3E (ORCPT + 99 others); Mon, 19 Aug 2019 15:29:04 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:33994 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728415AbfHST3E (ORCPT ); Mon, 19 Aug 2019 15:29:04 -0400 Received: by mail-io1-f67.google.com with SMTP id s21so6869876ioa.1 for ; Mon, 19 Aug 2019 12:29:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+O0L4th40lZfUVO9h1Mje9KCwXPgIa9fuj6EJ2cZs+8=; b=Btr9ix3b1xztCHj5X+hQqlPVKYBNLR7kIWvCamMJ2uxR4+lkH0AXXu98et2mtYHvIA /oO2D4S0DEFK/nCzPEPxKd9V5q70BBlei+heYvhtanNCCDTZnXYxIUil7uGK5Y/OOK5M FBBd9Zer/8XX/AqRlQHi61MbQmAlYTT7VNm2dr4DjEINs/UWblbIQTeVnQjiEHOL936t +PzJ+KU6+f6dCZ8hVsVs4NteBoRg+V9oS+PH7SF8wKZ0+UvFHM6T7ktrACLBXaU58mk2 kjh+yq9WXAwGV5A7aIB5T6rPBhG5oEMt9hYHI79u8BLg39H5SJr2QEUfm55/qSIlCO22 DDAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=+O0L4th40lZfUVO9h1Mje9KCwXPgIa9fuj6EJ2cZs+8=; b=Eu7o8AtmtI8NX7Nh4r2furGvl4h+KgiQEhVA07kOdTqHlVLlyv5Qlc/Y1Nvg982dHC btd/qEQMkqs76TqpbQoofQ81II3R3K//JpbMxHkW9pYiI+IM1TlZCw0I6IsBEGPiYoPm hY5zwG3LMnCfQifQ88KwjPNKxg9yLhn/maLDzZDICPqSG+YC1e3scBs2vMzFunOSKcQE LF0jr83ty82AwIKPRaRcuc0cvBdkqV5hb7me38trFIVE3UnY0IOPl6LGAKNBYlzK7Y0M 9/51YTiFFtFKz4iotERW/vegRfAub5mKs16FRZ0wK0lF56Nd3Toi5dfuUGC+/CmqJ6CU t4+w== X-Gm-Message-State: APjAAAUjNxyA7zqxgLdSDWOwCqWIIlwT4MIl4e9QGonqu1UYhvGtSJeJ aNITEUpGVSlIcc/TJ6jub7WljpPl+P8= X-Received: by 2002:a5e:de0d:: with SMTP id e13mr15023269iok.144.1566242943225; Mon, 19 Aug 2019 12:29:03 -0700 (PDT) Received: from gouda.nowheycreamery.com (d28-23-121-75.dim.wideopenwest.com. [23.28.75.121]) by smtp.gmail.com with ESMTPSA id v23sm16243957ioh.58.2019.08.19.12.29.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 12:29:02 -0700 (PDT) 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 1/6] NFS: Add an nfs4_call_sync_custom() function Date: Mon, 19 Aug 2019 15:28:55 -0400 Message-Id: <20190819192900.19312-2-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20190819192900.19312-1-Anna.Schumaker@Netapp.com> References: <20190819192900.19312-1-Anna.Schumaker@Netapp.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 From: Anna Schumaker There are a few cases where we need to manually configure the rpc_task_setup structure to get the behavior we want. Signed-off-by: Anna Schumaker --- fs/nfs/nfs4proc.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 1406858bae6c..e5b6499c0b8b 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -1073,14 +1073,26 @@ static const struct rpc_call_ops nfs40_call_sync_ops = { .rpc_call_done = nfs40_call_sync_done, }; +static int nfs4_call_sync_custom(struct rpc_task_setup *task_setup) +{ + int ret; + struct rpc_task *task; + + task = rpc_run_task(task_setup); + if (IS_ERR(task)) + return PTR_ERR(task); + + ret = task->tk_status; + rpc_put_task(task); + return ret; +} + static int nfs4_call_sync_sequence(struct rpc_clnt *clnt, struct nfs_server *server, struct rpc_message *msg, struct nfs4_sequence_args *args, struct nfs4_sequence_res *res) { - int ret; - struct rpc_task *task; struct nfs_client *clp = server->nfs_client; struct nfs4_call_sync_data data = { .seq_server = server, @@ -1094,14 +1106,7 @@ static int nfs4_call_sync_sequence(struct rpc_clnt *clnt, .callback_data = &data }; - task = rpc_run_task(&task_setup); - if (IS_ERR(task)) - ret = PTR_ERR(task); - else { - ret = task->tk_status; - rpc_put_task(task); - } - return ret; + return nfs4_call_sync_custom(&task_setup); } int nfs4_call_sync(struct rpc_clnt *clnt, -- 2.22.1