Skip to content

Commit

Permalink
SUNRPC: remove BUG_ON from xprt_destroy_backchannel
Browse files Browse the repository at this point in the history
If max_reqs is 0, do nothing besides the usual dprintks.

Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Weston Andros Adamson authored and Trond Myklebust committed Nov 4, 2012
1 parent e454a7a commit c4ded8d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/sunrpc/backchannel_rqst.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ void xprt_destroy_backchannel(struct rpc_xprt *xprt, unsigned int max_reqs)

dprintk("RPC: destroy backchannel transport\n");

BUG_ON(max_reqs == 0);
if (max_reqs == 0)
goto out;

spin_lock_bh(&xprt->bc_pa_lock);
xprt_dec_alloc_count(xprt, max_reqs);
list_for_each_entry_safe(req, tmp, &xprt->bc_pa_list, rq_bc_pa_list) {
Expand All @@ -202,6 +204,7 @@ void xprt_destroy_backchannel(struct rpc_xprt *xprt, unsigned int max_reqs)
}
spin_unlock_bh(&xprt->bc_pa_lock);

out:
dprintk("RPC: backchannel list empty= %s\n",
list_empty(&xprt->bc_pa_list) ? "true" : "false");
}
Expand Down

0 comments on commit c4ded8d

Please sign in to comment.