Linux-NFS Archive on lore.kernel.org
 help / Atom feed
* [PATCH 1/1] NFSv4.2 fix unnecessary retry in nfs4_copy_file_range
@ 2019-01-08 17:55 Olga Kornievskaia
  2019-01-11 19:04 ` Schumaker, Anna
  0 siblings, 1 reply; 2+ messages in thread
From: Olga Kornievskaia @ 2019-01-08 17:55 UTC (permalink / raw)
  To: trond.myklebust, anna.schumaker; +Cc: linux-nfs

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 <kolga@netapp.com>
---
 fs/nfs/nfs4file.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c
index 46d691b..81554af 100644
--- a/fs/nfs/nfs4file.c
+++ b/fs/nfs/nfs4file.c
@@ -137,11 +137,7 @@ static ssize_t nfs4_copy_file_range(struct file *file_in, loff_t pos_in,
 
 	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)
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] NFSv4.2 fix unnecessary retry in nfs4_copy_file_range
  2019-01-08 17:55 [PATCH 1/1] NFSv4.2 fix unnecessary retry in nfs4_copy_file_range Olga Kornievskaia
@ 2019-01-11 19:04 ` Schumaker, Anna
  0 siblings, 0 replies; 2+ messages in thread
From: Schumaker, Anna @ 2019-01-11 19:04 UTC (permalink / raw)
  To: olga.kornievskaia, trond.myklebust; +Cc: linux-nfs

Hi Olga,

On Tue, 2019-01-08 at 12:55 -0500, Olga Kornievskaia wrote:
> 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 <kolga@netapp.com>
> ---
>  fs/nfs/nfs4file.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c
> index 46d691b..81554af 100644
> --- a/fs/nfs/nfs4file.c
> +++ b/fs/nfs/nfs4file.c
> @@ -137,11 +137,7 @@ static ssize_t nfs4_copy_file_range(struct file *file_in,
> loff_t pos_in,
>  
>  	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);

I think this is the only user of the variable "ret", so can you remove its
declaration at the top of this function too?

  CC [M]  fs/nfs/nfs4file.o
fs/nfs/nfs4file.c: In function ‘nfs4_copy_file_range’:
fs/nfs/nfs4file.c:136:10: error: unused variable ‘ret’ [-Werror=unused-variable]
  ssize_t ret;
          ^~~
cc1: all warnings being treated as errors

Thanks,
Anna

>  }
>  
>  static loff_t nfs4_file_llseek(struct file *filep, loff_t offset, int whence)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-08 17:55 [PATCH 1/1] NFSv4.2 fix unnecessary retry in nfs4_copy_file_range Olga Kornievskaia
2019-01-11 19:04 ` Schumaker, Anna

Linux-NFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nfs/0 linux-nfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nfs linux-nfs/ https://lore.kernel.org/linux-nfs \
		linux-nfs@vger.kernel.org linux-nfs@archiver.kernel.org
	public-inbox-index linux-nfs


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-nfs


AGPL code for this site: git clone https://public-inbox.org/ public-inbox