Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp279308ybi; Wed, 29 May 2019 21:15:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAsBKRjIdxi6rXzyd+J4PXVWZMHn8DdOVBso54CpRt5o4YsKyurSQQ4fOoSqlzCMmzRLPy X-Received: by 2002:aa7:93ba:: with SMTP id x26mr1696633pff.238.1559189745740; Wed, 29 May 2019 21:15:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559189745; cv=none; d=google.com; s=arc-20160816; b=Pm+C0T+29em4ufurmfeyiz84vAiYPjN3d/DJEzulepODGsYRGDz2URN8HOkfjGAl1K nzIQtztfQxakaAtIWRhnk+zqmEW8DhJJIDQDKhifNk6lhk4N4dh2xP3S8NgYzMCMkPoL +scGmcsTHo3qzEksh90EEVGrdjYtYZ1ANYOzwPs+9C1gxyqlvZC+WozvCCUqYAMnZBAy EUqhiGR1ASE5BWoIpVJs7Ou6LhJspSWiwo+TEUscj/DRrWzV52x85H85UX/xwkM/W//i OS8vrMQhJT/9oLdVhpcWVgGcrG+EG4zUlN3Lg9YDtVekrn7nGccHeBk86x0SmpL93igV 9uTA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WFAZqB9oX2L/owIeeS2mgkMh/RoGlUNBuDMKj4i0cak=; b=mrzOk1Ale5lKzpI3AjHcjU7K0YcsvdEJPLWXDdcU6+3bLsHr2RVBAsNcByF816AFLO h2JiR7DiTl02MzbXsfphOrAbm/cHCi14gTOFJNSMfuhTp0Kbccwod8gHaE4BCv7hsFQ4 D3Khk2TQ8lmc3CVjRSP6+cPeNGsDHRwZUwwXdRPtJwUVRlxikE47vOOchDmWioOWXnnp gIYFGTP4ZMRI1zV+1rN0HXaQ4z3V6+D5K+0QKKsVDvUK/cUnOsRi7NIoWVXoZ9B+wFVQ m9+zpKzfiBxLBqntyGG3qNoxGMSd/9wRB8kNy4w/0Bm/W68j29kKiFVxmKlR/zXrhbUc zJYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Q6/bn4Q5"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f38si2099964plb.339.2019.05.29.21.15.30; Wed, 29 May 2019 21:15:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@kernel.org header.s=default header.b="Q6/bn4Q5"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730936AbfE3EOb (ORCPT + 99 others); Thu, 30 May 2019 00:14:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:41588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729244AbfE3DQL (ORCPT ); Wed, 29 May 2019 23:16:11 -0400 Received: from localhost (ip67-88-213-2.z213-88-67.customer.algx.net [67.88.213.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AAA7E2449A; Thu, 30 May 2019 03:16:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559186170; bh=2nYH1qQ9RxS8QLjCa72oJqTvw0iZyiwzd7aWWj46HsY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q6/bn4Q5B9TXpKR3ozBAPkt7h4DHvEKGJUDV60TstWaqDdf3A2y+3FEIJcBVjJzIG SOBEQb0Oqv+Q9Tq9VkxE6UxFWOt/AY+cn6rTL610sgRaJjbr/xVYa/j+5llY1yK+dx ueE8TrEjPEqF+lF+M+MIDTKOklv8YqAjIJpd14xQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Olga Kornievskaia , Anna Schumaker , Yu Xu Subject: [PATCH 4.19 025/276] NFSv4.2 fix unnecessary retry in nfs4_copy_file_range Date: Wed, 29 May 2019 20:03:03 -0700 Message-Id: <20190530030525.712173368@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190530030523.133519668@linuxfoundation.org> References: <20190530030523.133519668@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Olga Kornievskaia commit 45ac486ecf2dc998e25cf32f0cabf2deaad875be upstream. Currently nfs42_proc_copy_file_range() can not return EAGAIN. Fixes: e4648aa4f98a ("NFS recover from destination server reboot for copies") Signed-off-by: Olga Kornievskaia Signed-off-by: Anna Schumaker Cc: Yu Xu Signed-off-by: Greg Kroah-Hartman --- fs/nfs/nfs4file.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) --- a/fs/nfs/nfs4file.c +++ b/fs/nfs/nfs4file.c @@ -133,15 +133,9 @@ static ssize_t nfs4_copy_file_range(stru struct file *file_out, loff_t pos_out, size_t count, unsigned int flags) { - ssize_t ret; - if (file_inode(file_in) == file_inode(file_out)) return -EINVAL; -retry: - ret = nfs42_proc_copy(file_in, pos_in, file_out, pos_out, count); - if (ret == -EAGAIN) - goto retry; - return ret; + return nfs42_proc_copy(file_in, pos_in, file_out, pos_out, count); } static loff_t nfs4_file_llseek(struct file *filep, loff_t offset, int whence)