diff options
author | Weston Andros Adamson <dros@netapp.com> | 2012-10-23 10:43:41 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-11-04 14:43:41 -0500 |
commit | b25cd058f25ea2054351bbe501956002cd8ed4c5 (patch) | |
tree | 85429bb1b4ef052235d981fcbb588a4afa5e3e93 /net/sunrpc/svc.c | |
parent | ff1fdb9b805fc03fb51c7b061604360af92d0c9e (diff) |
SUNRPC: remove BUG_ONs checking RPCSVC_MAXPAGES
Replace two bounds checking BUG_ON() calls with WARN_ON_ONCE() and resetting
the requested size to RPCSVC_MAXPAGES.
Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/svc.c')
-rw-r--r-- | net/sunrpc/svc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 664979bee1d2..3bf5a54982ba 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -587,7 +587,9 @@ svc_init_buffer(struct svc_rqst *rqstp, unsigned int size, int node) | |||
587 | * We assume one is at most one page | 587 | * We assume one is at most one page |
588 | */ | 588 | */ |
589 | arghi = 0; | 589 | arghi = 0; |
590 | BUG_ON(pages > RPCSVC_MAXPAGES); | 590 | WARN_ON_ONCE(pages > RPCSVC_MAXPAGES); |
591 | if (pages > RPCSVC_MAXPAGES) | ||
592 | pages = RPCSVC_MAXPAGES; | ||
591 | while (pages) { | 593 | while (pages) { |
592 | struct page *p = alloc_pages_node(node, GFP_KERNEL, 0); | 594 | struct page *p = alloc_pages_node(node, GFP_KERNEL, 0); |
593 | if (!p) | 595 | if (!p) |