/* Synchronous I/O uses a stack-allocated iocb. Thus we can't trust the iocb is still valid here if this is a synchronous request.  */
static void nfs_direct_complete(struct nfs_direct_req *dreq)
/* Synchronous I/O uses a stack-allocated iocb. Thus we can't trust the iocb is still valid here if this is a synchronous request.  */
static void nfs_direct_complete(struct nfs_direct_req *dreq)
{
	if (dreq->iocb) {
		long res = (long) dreq->error;
		if (!res)
			res = (long) dreq->count;
		aio_complete(dreq->iocb, res, 0);
	}
	complete_all(&dreq->completion);
	nfs_direct_req_release(dreq);
}