]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
SUNRPC: remove BUG_ON calls from cache_read
authorWeston Andros Adamson <dros@netapp.com>
Tue, 23 Oct 2012 14:43:36 +0000 (10:43 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Sun, 4 Nov 2012 19:43:41 +0000 (14:43 -0500)
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>
net/sunrpc/cache.c

index fc2f7aa4dca7aa04b3e7bc45cd39d47b744a1da4..9afa4393c21728cb5c0cbd675b6c25966fe99175 100644 (file)
@@ -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);