diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c index 22d26b3690709b2aa11176996b595f90cfaf44df..b12da6aa54129b2398e9454c1a9a45b6289d946d 100644 --- a/fs/afs/rxrpc.c +++ b/fs/afs/rxrpc.c @@ -315,7 +315,7 @@ static int afs_send_pages(struct afs_call *call, struct msghdr *msg) * packet as RxRPC might give us the reply before it * returns from sending the request. */ - if (first + nr >= last) + if (first + nr - 1 >= last) call->state = AFS_CALL_AWAIT_REPLY; ret = rxrpc_kernel_send_data(afs_socket, call->rxcall, msg, bytes);