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; task = rpc_run_task(&task_setup_data); if (IS_ERR(task)) -- 1.7.9.6 (Apple Git-31.1) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html