[PATCH net 7/9] rxrpc: Fix I/O thread stop
Hillf Danton
hdanton at sina.com
Thu Dec 15 16:19:58 PST 2022
On 15 Dec 2022 16:20:38 +0000 David Howells <dhowells at redhat.com>
> --- a/net/rxrpc/io_thread.c
> +++ b/net/rxrpc/io_thread.c
> @@ -425,6 +425,7 @@ int rxrpc_io_thread(void *data)
> struct rxrpc_local *local = data;
> struct rxrpc_call *call;
> struct sk_buff *skb;
> + bool should_stop;
>
> complete(&local->io_thread_ready);
>
> @@ -478,13 +479,14 @@ int rxrpc_io_thread(void *data)
> }
>
> set_current_state(TASK_INTERRUPTIBLE);
> + should_stop = kthread_should_stop();
> if (!skb_queue_empty(&local->rx_queue) ||
> !list_empty(&local->call_attend_q)) {
> __set_current_state(TASK_RUNNING);
> continue;
> }
>
> - if (kthread_should_stop())
> + if (should_stop)
> break;
> schedule();
> }
At the second glance still fail to see the difference this change can
make.
More information about the linux-afs
mailing list