Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3117229ybl; Mon, 19 Aug 2019 12:30:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqz1MMPLc2LBtkdBot49+GRLsWYRe3qFmer8v+C5vYKCQLdcq3+qr/Q6iO3HH7rdXDIza0Ge X-Received: by 2002:a63:188:: with SMTP id 130mr21197118pgb.231.1566243002119; Mon, 19 Aug 2019 12:30:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566243002; cv=none; d=google.com; s=arc-20160816; b=OlBY/yF+J67PXwJZrTt0Pf19KPsl5RQZCXQ2KYw8VwQE/dgL0J4AmzTKP7Cuvuhw5N KZ/sXuw0hJdYQDfunML/BFUgkAeza+beGTw3kmDgOk+luAdtH2MU0MsgbEUiZaCtR/wv l+ukef+DH4sj94wf3SeKMruW7zoGVY8uML/f0005jR24P1IvKTlyjRvHv3BKQLiON2Ku phl+to4i7YEeyu2YD+TF5D85ltJiulByFojI4qlVcksO/nUsFygEVnIqLIoihn3Cw1/t KV16IE3mYsnT4b4lGaIbuaUFdziTZyGcqB1Vi2zZcqJmYCb7ZINW8nTai0HTd6Rwgmf6 nljw== 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=4EkaWZAwVF5PrNhAcdD0GA1eb9taUgFuiwCCExhi/vg=; b=BNEGD0a5wc4hi/Ndh6j5ClV4af7c7VhKgJfJk2925Kr2+26VN68nvIxF1wAoJ0ZUP6 bGfGSF/zYYi94+rZYMeZ6svxTDx3juV0zjJWrEmTGvvVM5iyUW+6T2X3E+jUXNxP30yC l0auFovkIwLSXm56rLfRL3Er4g21sDqdkBasa2ozUFazr38OMbVTZWiiJDuq+Ous/kTZ vDunX2FtHwMVo2Q191pAKRUfGbBu73ktHmm02BmRNzveLNTFbobbI+kazeQUwojz7GPM EcFzYx5TZ9QYmuSdyam1GnLbtV7weSDeZz/kxQezYq5ixQbG6AeH1zcJBSNjVUI4hPDh C82Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=WSbl9cN0; 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 94si10696783plf.221.2019.08.19.12.29.30; Mon, 19 Aug 2019 12:30:02 -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=WSbl9cN0; 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 S1728438AbfHST3G (ORCPT + 99 others); Mon, 19 Aug 2019 15:29:06 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:37280 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728415AbfHST3G (ORCPT ); Mon, 19 Aug 2019 15:29:06 -0400 Received: by mail-io1-f66.google.com with SMTP id q22so6852799iog.4 for ; Mon, 19 Aug 2019 12:29:06 -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=4EkaWZAwVF5PrNhAcdD0GA1eb9taUgFuiwCCExhi/vg=; b=WSbl9cN0DLPaAnCRn0sRrxP+8jOD08LExFQxl02NNjcNbGwqvCfU9miybeUBUaYiN1 Fg0c+fH7DNmcV3YY2Sq/7pid3OlMiKDzDcF8UPHWo2deuKrQKN2JJ5hZyciFu/lcOKmE 9Oxxblnx5cAkszYgc4smV+PGvSC8HYaHp3Twe+wvyD+3vFzsTn4qAX2XMzbSl54ci3Cs wev5i1HHL7TpSqIbDm0Oiqw8D7Jcg4XNB1GAXNplWIEoI6lXowP8Fri8HQY2Cki+2ppQ tVto1HtrZv3LlIrpJDe1CQ61HmYhwkcey8ONn0aTv6FTE2Wco9rU41gW26he+JMeRXK5 pYIQ== 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=4EkaWZAwVF5PrNhAcdD0GA1eb9taUgFuiwCCExhi/vg=; b=I7do0W2tPHfRj8YbB9R6QA2vqrpaxptYxgExf7RXiIhp56eLQ9nJ6P/aO3mQSaU7pB UoWuRc/STY+VOZ1ViYP+0iQW1rZAPvFHisxFySlY6ab8Uodbn+m5O2z3OmV8JGgdapRJ B3WiNd1Bb7wZ4xzu2JXu70J5oCZk8RG44LHoyJwqOVodNVIO8InJohrxdU/a8HOmoYlf OB1HsT1XfNMsZlHXpyikU0vZMGW486lce6460/jirydqeYDn50unDMHZuXG85SNrHTMV S1gHijgoxnEBNLeMlVd2Keiq06SibricMAZSSgdJENDpYihnGqapLXLYmAlhKQ877DAl aWVw== X-Gm-Message-State: APjAAAVjgl8qvpcF9WDgJUQw8z7Ez71L/FHriE5HZSsPPUAAYHPbh0Cy O4yRhEHzPFQQl3vhCPusUKaak1nlxAc= X-Received: by 2002:a05:6602:2193:: with SMTP id b19mr7070170iob.113.1566242945806; Mon, 19 Aug 2019 12:29:05 -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.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 12:29:05 -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 4/6] NFS: Have nfs41_proc_reclaim_complete() call nfs4_call_sync_custom() Date: Mon, 19 Aug 2019 15:28:58 -0400 Message-Id: <20190819192900.19312-5-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 An async call followed by an rpc_wait_for_completion() is basically the same as a synchronous call, so we can use nfs4_call_sync_custom() to keep our custom callback ops and the RPC_TASK_NO_ROUND_ROBIN flag. Signed-off-by: Anna Schumaker --- fs/nfs/nfs4proc.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index de2b3fd806ef..1b7863ec12d3 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -8857,7 +8857,6 @@ static int nfs41_proc_reclaim_complete(struct nfs_client *clp, const struct cred *cred) { struct nfs4_reclaim_complete_data *calldata; - struct rpc_task *task; struct rpc_message msg = { .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_RECLAIM_COMPLETE], .rpc_cred = cred, @@ -8866,7 +8865,7 @@ static int nfs41_proc_reclaim_complete(struct nfs_client *clp, .rpc_client = clp->cl_rpcclient, .rpc_message = &msg, .callback_ops = &nfs4_reclaim_complete_call_ops, - .flags = RPC_TASK_ASYNC | RPC_TASK_NO_ROUND_ROBIN, + .flags = RPC_TASK_NO_ROUND_ROBIN, }; int status = -ENOMEM; @@ -8881,15 +8880,7 @@ static int nfs41_proc_reclaim_complete(struct nfs_client *clp, msg.rpc_argp = &calldata->arg; msg.rpc_resp = &calldata->res; task_setup_data.callback_data = calldata; - task = rpc_run_task(&task_setup_data); - if (IS_ERR(task)) { - status = PTR_ERR(task); - goto out; - } - status = rpc_wait_for_completion_task(task); - if (status == 0) - status = task->tk_status; - rpc_put_task(task); + status = nfs4_call_sync_custom(&task_setup_data); out: dprintk("<-- %s status=%d\n", __func__, status); return status; -- 2.22.1