Commit 0db74d9a authored by Weston Andros Adamson's avatar Weston Andros Adamson Committed by Trond Myklebust

SUNRPC: remove BUG_ON calls from cache_read

Replace BUG_ON() with WARN_ON_ONCE() in two parts of cache_read().
Signed-off-by: default avatarWeston Andros Adamson <dros@netapp.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 4c9c52e4
...@@ -775,11 +775,11 @@ static ssize_t cache_read(struct file *filp, char __user *buf, size_t count, ...@@ -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) { if (rp->q.list.next == &cd->queue) {
spin_unlock(&queue_lock); spin_unlock(&queue_lock);
mutex_unlock(&inode->i_mutex); mutex_unlock(&inode->i_mutex);
BUG_ON(rp->offset); WARN_ON_ONCE(rp->offset);
return 0; return 0;
} }
rq = container_of(rp->q.list.next, struct cache_request, q.list); 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) if (rp->offset == 0)
rq->readers++; rq->readers++;
spin_unlock(&queue_lock); spin_unlock(&queue_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment