Skip to content

Commit 45ac486

Browse files
Olga Kornievskaiaamschuma-ntap
authored andcommitted
NFSv4.2 fix unnecessary retry in nfs4_copy_file_range
Currently nfs42_proc_copy_file_range() can not return EAGAIN. Fixes: e4648aa ("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>
1 parent e7f4509 commit 45ac486

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

fs/nfs/nfs4file.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,9 @@ static ssize_t nfs4_copy_file_range(struct file *file_in, loff_t pos_in,
133133
struct file *file_out, loff_t pos_out,
134134
size_t count, unsigned int flags)
135135
{
136-
ssize_t ret;
137-
138136
if (file_inode(file_in) == file_inode(file_out))
139137
return -EINVAL;
140-
retry:
141-
ret = nfs42_proc_copy(file_in, pos_in, file_out, pos_out, count);
142-
if (ret == -EAGAIN)
143-
goto retry;
144-
return ret;
138+
return nfs42_proc_copy(file_in, pos_in, file_out, pos_out, count);
145139
}
146140

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

0 commit comments

Comments
 (0)