diff options
author | Weston Andros Adamson <dros@netapp.com> | 2012-10-23 16:43:36 +0200 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-11-04 20:43:41 +0100 |
commit | 0db74d9a2d2b312dd2cff066c5b97b8e626e403a (patch) | |
tree | ea7b0897f6ab7281f5e27d3ebb5d671e14745e9a | |
parent | SUNRPC: remove BUG_ON from bc_send (diff) | |
download | linux-0db74d9a2d2b312dd2cff066c5b97b8e626e403a.tar.xz linux-0db74d9a2d2b312dd2cff066c5b97b8e626e403a.zip |
SUNRPC: remove BUG_ON calls from cache_read
Replace BUG_ON() with WARN_ON_ONCE() in two parts of cache_read().
Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r-- | net/sunrpc/cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index fc2f7aa4dca7..9afa4393c217 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c @@ -775,11 +775,11 @@ static ssize_t cache_read(struct file *filp, char __user *buf, size_t count, if (rp->q.list.next == &cd->queue) { spin_unlock(&queue_lock); mutex_unlock(&inode->i_mutex); - BUG_ON(rp->offset); + WARN_ON_ONCE(rp->offset); return 0; } rq = container_of(rp->q.list.next, struct cache_request, q.list); - BUG_ON(rq->q.reader); + WARN_ON_ONCE(rq->q.reader); if (rp->offset == 0) rq->readers++; spin_unlock(&queue_lock); |