Skip to contentSkip to conversation

NLM: Convert lockd to use kthreads

PATCH J. Bruce Fields 2 participants 2 messages Feb 11, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Oops, did I forget to send this? I don't' see it in the archives. Apologies:

Quoted 21 lines · bfields

On Thu, Feb 07, 2008 at 04:34:55PM -0500, Jeff Layton wrote:
...

Quoted 4 lines
fs/lockd/svc.c +0 -0
index 0822646..378b393 100644

...

fs/lockd/svc.c lockd(struct svc_rqst *rqstp) · line 172

Quoted 7 lines
fs/lockd/svc.c +3 -0
@@ -174,6 +167,10 @@ lockd(struct svc_rqst *rqstp)
 		} else if (time_before(grace_period_expire, jiffies))
 			clear_grace_period();
 
+		/* nlmsvc_retry_blocked can block, so check for kthread_stop */
+		if (kthread_should_stop())
+			break;

The following svc_recv call will check kthread_should_stop() pretty early on, so I don't believe this is necessary?

Assuming that's correct, I've deleted these lines and applied the rest.

--b.

#1 lore raw
Quoted 24 lines · On Mon, 11 Feb 2008 10:29:38 -0500 "J. Bruce Fields" <[email protected]>…

Oops, did I forget to send this? I don't' see it in the archives. Apologies:

Quoted 20 lines · bfields

On Thu, Feb 07, 2008 at 04:34:55PM -0500, Jeff Layton wrote:
...

Quoted 4 lines
fs/lockd/svc.c +0 -0
index 0822646..378b393 100644

...

fs/lockd/svc.c lockd(struct svc_rqst *rqstp) · line 172

Quoted 7 lines
fs/lockd/svc.c +3 -0
@@ -174,6 +167,10 @@ lockd(struct svc_rqst *rqstp)
 		} else if (time_before(grace_period_expire, jiffies))
 			clear_grace_period();
 
+		/* nlmsvc_retry_blocked can block, so check for kthread_stop */
+		if (kthread_should_stop())
+			break;

The following svc_recv call will check kthread_should_stop() pretty early on, so I don't believe this is necessary?

Assuming that's correct, I've deleted these lines and applied the rest.

Sounds reasonable...ACK

Signature · 1 line
Jeff Layton <[email protected]>