diff options
author | Weston Andros Adamson <dros@netapp.com> | 2012-10-23 10:43:36 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-11-04 14:43:41 -0500 |
commit | 0db74d9a2d2b312dd2cff066c5b97b8e626e403a (patch) | |
tree | ea7b0897f6ab7281f5e27d3ebb5d671e14745e9a /net/sunrpc | |
parent | 4c9c52e479f493ccfc3f513e870912115b49058f (diff) |
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>
Diffstat (limited to 'net/sunrpc')
-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, | |||
775 | if (rp->q.list.next == &cd->queue) { | 775 | if (rp->q.list.next == &cd->queue) { |
776 | spin_unlock(&queue_lock); | 776 | spin_unlock(&queue_lock); |
777 | mutex_unlock(&inode->i_mutex); | 777 | mutex_unlock(&inode->i_mutex); |
778 | BUG_ON(rp->offset); | 778 | WARN_ON_ONCE(rp->offset); |
779 | return 0; | 779 | return 0; |
780 | } | 780 | } |
781 | rq = container_of(rp->q.list.next, struct cache_request, q.list); | 781 | rq = container_of(rp->q.list.next, struct cache_request, q.list); |
782 | BUG_ON(rq->q.reader); | 782 | WARN_ON_ONCE(rq->q.reader); |
783 | if (rp->offset == 0) | 783 | if (rp->offset == 0) |
784 | rq->readers++; | 784 | rq->readers++; |
785 | spin_unlock(&queue_lock); | 785 | spin_unlock(&queue_lock); |