SUNRPC: remove BUG_ON from rpc_call_sync
Subsystems (3)
PATCH 1/1 SUNRPC: remove BUG_ON from rpc_call_sync
Use WARN_ON_ONCE instead of calling BUG_ON and return -EINVAL when RPC_TASK_ASYNC flag is passed to rpc_call_sync.
Signed-off-by Weston Andros Adamson <[email protected]>
--- net/sunrpc/clnt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
net/sunrpc/clnt.c +6 -1
@@ -840,7 +840,12 @@ int rpc_call_sync(struct rpc_clnt *clnt, const struct rpc_message *msg, int flag };int status; -BUG_ON (flags &RPC_TASK_ASYNC ); +WARN_ON_ONCE (flags &RPC_TASK_ASYNC ); +if (flags &RPC_TASK_ASYNC ) { +rpc_release_calldata (task_setup_data.callback_ops, + task_setup_data.callback_data); +return -EINVAL ; + } task =rpc_run_task (&task_setup_data);if (IS_ERR (task))
Signature · 1 line
1.7.9.6 (Apple Git-31.1)