Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3117226ybl; Mon, 19 Aug 2019 12:30:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqwt6X3w/NLZSCXs3Lh3mqSXb6Tui9AmNrWh9k4bUdBw6e1JdJBoj3gS95YOYC3K+C2E38XM X-Received: by 2002:a17:90a:26ac:: with SMTP id m41mr22642313pje.59.1566243002114; 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=f1CsED1ZK5BTVJxGs59cRT3K0C+MO8iWgFYasM+l89eRT0RxKIePWrOw6Hk/zftg1c aSWYsFeWC9XzO0w34BY3JY0zSqrLgNPTinmrUSoz9VckFrmHJ2+AST2RuSHeiateZUha 9CJnwT9Jda9OTivRXm/kfkHKzCsvac7EU9xb03BXnQN7V/otUGzJ0rS2iqymRA2+NlfK VShz2oRQP9b0D5GHBoDjbV1l8QqCo36IQH2gdcmAsShrJq6xMsAZmnS6k54JNfcE6Rf2 grQQCuo95F/4unw2UsxXD8EeQ292lpSQp8iMRPN2WyKk+lAuxd8TTdQYjrzVub77LF6g /8rQ== 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=MKe9IJM5w7IAu8fm9oR8ZK0S/jMYLoynIc8LUP6DP9g=; b=j18fkFE9rIS/0PIZWw0K1G95Kr7NkxC5YWfUJoRavPiGUWHpzVFsfsL+J+mjsKX8K/ 3OsCIBuR7fPAe87jW1GQDJd2VvSa44A90OX91muLICEvJ8ey4M9IygSkN4XDAavjI8Tq E6l/MDokshdwNrEPt4aNiV1pqnT98DzZwNlwRxrJ42Ku03KKixSzIqlCnG70FS8jtGEM K6AaPFTQ8og8J/8hh1dLGuvMWgquy3zuiIx57eHbFur4xrDIkSbZQLuTI6mghDsr1+Eu jvHh7GJJrrotqB6BY79ras3/AzZREZ7gdAsqHWUXYAbJKIf/CI12uuDXz2mOLxr2QkA3 6rgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=D9agAE3b; 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 x19si10441172pgi.515.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=D9agAE3b; 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 S1728461AbfHST3J (ORCPT + 99 others); Mon, 19 Aug 2019 15:29:09 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:34901 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728415AbfHST3I (ORCPT ); Mon, 19 Aug 2019 15:29:08 -0400 Received: by mail-io1-f66.google.com with SMTP id i22so6856551ioh.2 for ; Mon, 19 Aug 2019 12:29:08 -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=MKe9IJM5w7IAu8fm9oR8ZK0S/jMYLoynIc8LUP6DP9g=; b=D9agAE3bKFHyNmCMv/KGwwrLYVU1Im6veVcpn6s5kPz3x85wpRTGKxbnJ28bfQERPW szTNZVpnrwDG0WVhCgbJ3xrgp2hIi1Kh/Ge6x95Pp7UTm9VfbtEZcN6Bn+qAWUEXxGHH UfpfNEcjsW5k25RnGU0Of5wHSLpcdZgpSwr67ISoLSu14jAs0bK7eRv+Vm5hgxjhHhJ/ /MWrB9f4lUNyiUfZWiDxS3/QnleKpOvVsnwnTKDg1H8lngKmK1UTANvRmVPiGWZihqQo EaPM/hLkQmOYxBktse9kngppYYvQlX1/HSaJO9sTPwo8rMhu5/tldMgyWXDloltSgjMy ik+w== 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=MKe9IJM5w7IAu8fm9oR8ZK0S/jMYLoynIc8LUP6DP9g=; b=c1iWn7AiL6YsYiCnwkWRKGoWmOMElA1w/bQ3/SeZz7ZYfO1bc6tXf2aiyEqPlcODx+ OQnAL5Cj+Mmi/FffmGLvOdNieK5VncuVEjdEwy5sjEimnXjbOl2gb//IRVkKiPm1cfL0 ih+sfrNPzjkIkYTI4ybknYFoukc41pZHUqhm5018Dyd/WKENHIPY+H36DUQXocBZdG/k y0Fe+tuiYbSgBi1ZzrbDPip5LzucMLk/5+3aBAU9b9yc/SWDjVGYXawO5ja4YNJ6U3XI p+wsuDo3/8Ucbt1tJ0+yPLv7lqtCKLDkYUM22Blc3rKUrxTiP4nJF1ftJd2XgDDMTyrx 4oVQ== X-Gm-Message-State: APjAAAVMrUNdL/UxgsquoiqQc5pgNmxoW3KZd6cy+RUvBAMgrMo5nVoY Ora5J2gwwHje9ORYwI6V72o= X-Received: by 2002:a5e:9408:: with SMTP id q8mr10355497ioj.223.1566242947600; Mon, 19 Aug 2019 12:29:07 -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.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 12:29:07 -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 6/6] NFS: Have nfs4_proc_get_lease_time() call nfs4_call_sync_custom() Date: Mon, 19 Aug 2019 15:29:00 -0400 Message-Id: <20190819192900.19312-7-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 This removes some code duplication, since both functions were doing the same thing. Signed-off-by: Anna Schumaker --- fs/nfs/nfs4proc.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index df12af8f6b36..00c7a92e3d6b 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -8356,7 +8356,6 @@ static const struct rpc_call_ops nfs4_get_lease_time_ops = { int nfs4_proc_get_lease_time(struct nfs_client *clp, struct nfs_fsinfo *fsinfo) { - struct rpc_task *task; struct nfs4_get_lease_time_args args; struct nfs4_get_lease_time_res res = { .lr_fsinfo = fsinfo, @@ -8378,17 +8377,9 @@ int nfs4_proc_get_lease_time(struct nfs_client *clp, struct nfs_fsinfo *fsinfo) .callback_data = &data, .flags = RPC_TASK_TIMEOUT, }; - int status; nfs4_init_sequence(&args.la_seq_args, &res.lr_seq_res, 0, 1); - task = rpc_run_task(&task_setup); - - if (IS_ERR(task)) - return PTR_ERR(task); - - status = task->tk_status; - rpc_put_task(task); - return status; + return nfs4_call_sync_custom(&task_setup); } #ifdef CONFIG_NFS_V4_1 -- 2.22.1