|
@@ -601,6 +601,7 @@ int svc_recv(struct svc_rqst *rqstp, long timeout)
|
|
|
|
|
|
/* now allocate needed pages. If we get a failure, sleep briefly */
|
|
|
pages = (serv->sv_max_mesg + PAGE_SIZE) / PAGE_SIZE;
|
|
|
+ BUG_ON(pages >= RPCSVC_MAXPAGES);
|
|
|
for (i = 0; i < pages ; i++)
|
|
|
while (rqstp->rq_pages[i] == NULL) {
|
|
|
struct page *p = alloc_page(GFP_KERNEL);
|
|
@@ -615,7 +616,6 @@ int svc_recv(struct svc_rqst *rqstp, long timeout)
|
|
|
rqstp->rq_pages[i] = p;
|
|
|
}
|
|
|
rqstp->rq_pages[i++] = NULL; /* this might be seen in nfs_read_actor */
|
|
|
- BUG_ON(pages >= RPCSVC_MAXPAGES);
|
|
|
|
|
|
/* Make arg->head point to first page and arg->pages point to rest */
|
|
|
arg = &rqstp->rq_arg;
|