aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/proc.c
diff options
context:
space:
mode:
authorSachin Prabhu <sprabhu@redhat.com>2012-05-31 17:45:00 +0100
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-06-11 17:25:00 -0400
commit64f9a83665e4f168ff50ce1db9eb175f954048fa (patch)
tree9c940939a2df409938ca753e243b9ea1036ddade /fs/nfs/proc.c
parentc5afc8da5b881633717bfc0510792428aa01fa3f (diff)
NFSv2: EOF incorrectly set on short read
In cases where the server returns fewer bytes then those requested, we can incorrectly set the eof flag for the file. Fixing this allows the request to be retried with updated offset and count arguments. Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/proc.c')
-rw-r--r--fs/nfs/proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c
index a706b6bcc28..617c7419a08 100644
--- a/fs/nfs/proc.c
+++ b/fs/nfs/proc.c
@@ -651,7 +651,7 @@ static int nfs_read_done(struct rpc_task *task, struct nfs_read_data *data)
/* Emulate the eof flag, which isn't normally needed in NFSv2
* as it is guaranteed to always return the file attributes
*/
- if (data->args.offset + data->args.count >= data->res.fattr->size)
+ if (data->args.offset + data->res.count >= data->res.fattr->size)
data->res.eof = 1;
}
return 0;