Re: [PATCH 07/25] SUNRPC: remove BUG_ON() from call_bc_transmit()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2012-10-16 at 12:30 -0400, Weston Andros Adamson wrote:
> Replace BUG_ON() with WARN_ON_ONCE() and handle error condition by
> calling rpc_exit().
> 
> Signed-off-by: Weston Andros Adamson <dros@xxxxxxxxxx>
> ---
>  net/sunrpc/clnt.c |    7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
> index ced0f36..bff6438 100644
> --- a/net/sunrpc/clnt.c
> +++ b/net/sunrpc/clnt.c
> @@ -1750,7 +1750,12 @@ call_bc_transmit(struct rpc_task *task)
>  {
>  	struct rpc_rqst *req = task->tk_rqstp;
>  
> -	BUG_ON(task->tk_status != 0);
> +	WARN_ON_ONCE(task->tk_status != 0);
> +	if (task->tk_status != 0) {
> +		rpc_exit(task, task->tk_status);
> +		return;
> +	}
> +

Let's just get rid of this. Given the current use of call_bc_transmit,
it looks completely redundant.

>  	task->tk_status = xprt_prepare_transmit(task);
>  	if (task->tk_status == -EAGAIN) {
>  		/*

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.com
��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux