Skip to content

Commit

Permalink
NFSv4.2 fix unnecessary retry in nfs4_copy_file_range
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Anna Schumaker <[email protected]>
  • Loading branch information
Olga Kornievskaia authored and amschuma-ntap committed Jan 15, 2019
1 parent e7f4509 commit 45ac486
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions fs/nfs/nfs4file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 45ac486

Please sign in to comment.