]> git.baikalelectronics.ru Git - kernel.git/commitdiff
NFSv4.2 fix unnecessary retry in nfs4_copy_file_range
authorOlga Kornievskaia <olga.kornievskaia@gmail.com>
Sat, 12 Jan 2019 00:04:44 +0000 (19:04 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 15 Jan 2019 16:24:49 +0000 (11:24 -0500)
Currently nfs42_proc_copy_file_range() can not return EAGAIN.

Fixes: 7aa9bf7760f5 ("NFS recover from destination server reboot for copies")
Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4file.c

index 46d691ba04bc8fdb38b28beca6eb445c50b7443a..45b2322e092d2455b508a8fdc00f5bde0b73c4e9 100644 (file)
@@ -133,15 +133,9 @@ static ssize_t nfs4_copy_file_range(struct file *file_in, loff_t pos_in,
                                    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)