Re: [PATCH 05/25] SUNRPC: remove BUG_ON() from rpc_call_sync()

[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:
> Return -EINVAL instead of calling BUG_ON() when RPC_TASK_ASYNC flag is passed
> to rpc_call_sync().
> 
> Signed-off-by: Weston Andros Adamson <dros@xxxxxxxxxx>
> ---
>  net/sunrpc/clnt.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
> index 76d1730..a8a6bcf 100644
> --- a/net/sunrpc/clnt.c
> +++ b/net/sunrpc/clnt.c
> @@ -839,7 +839,8 @@ int rpc_call_sync(struct rpc_clnt *clnt, const struct rpc_message *msg, int flag
>  	};
>  	int status;
>  
> -	BUG_ON(flags & RPC_TASK_ASYNC);
> +	if (flags & RPC_TASK_ASYNC)
> +		return -EINVAL;

BTW: This needs to call rpc_release_calldata() before exiting.
>  
>  	task = rpc_run_task(&task_setup_data);
>  	if (IS_ERR(task))

-- 
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