Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346561
b: refs/heads/master
c: b25cd05
h: refs/heads/master
i:
  346559: 23d1d70
v: v3
  • Loading branch information
Weston Andros Adamson authored and Trond Myklebust committed Nov 4, 2012
1 parent 4563c41 commit ba461bc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ff1fdb9b805fc03fb51c7b061604360af92d0c9e
refs/heads/master: b25cd058f25ea2054351bbe501956002cd8ed4c5
4 changes: 3 additions & 1 deletion trunk/net/sunrpc/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,9 @@ svc_init_buffer(struct svc_rqst *rqstp, unsigned int size, int node)
* We assume one is at most one page
*/
arghi = 0;
BUG_ON(pages > RPCSVC_MAXPAGES);
WARN_ON_ONCE(pages > RPCSVC_MAXPAGES);
if (pages > RPCSVC_MAXPAGES)
pages = RPCSVC_MAXPAGES;
while (pages) {
struct page *p = alloc_pages_node(node, GFP_KERNEL, 0);
if (!p)
Expand Down
5 changes: 4 additions & 1 deletion trunk/net/sunrpc/svc_xprt.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,10 @@ int svc_alloc_arg(struct svc_rqst *rqstp)

/* 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);
WARN_ON_ONCE(pages >= RPCSVC_MAXPAGES);
if (pages >= RPCSVC_MAXPAGES)
/* use as many pages as possible */
pages = RPCSVC_MAXPAGES - 1;
for (i = 0; i < pages ; i++)
while (rqstp->rq_pages[i] == NULL) {
struct page *p = alloc_page(GFP_KERNEL);
Expand Down

0 comments on commit ba461bc

Please sign in to comment.