diff -urN 2.6.9-rc4-mm1-RT-U7/fs/lockd/clntlock.c 2.6.9-rc4-mm1-RT-U7-work/fs/lockd/clntlock.c --- 2.6.9-rc4-mm1-RT-U7/fs/lockd/clntlock.c 2004-10-12 09:32:10.000000000 +0200 +++ 2.6.9-rc4-mm1-RT-U7-work/fs/lockd/clntlock.c 2004-10-19 21:26:14.000000000 +0200 @@ -6,6 +6,7 @@ * Copyright (C) 1996, Olaf Kirch */ +#include #include #include #include @@ -32,7 +33,7 @@ */ struct nlm_wait { struct nlm_wait * b_next; /* linked list */ - wait_queue_head_t b_wait; /* where to wait on */ + struct completion b_wait; /* where to wait on */ struct nlm_host * b_host; struct file_lock * b_lock; /* local file lock */ unsigned short b_reclaim; /* got to reclaim lock */ @@ -53,7 +54,7 @@ block.b_host = host; block.b_lock = fl; - init_waitqueue_head(&block.b_wait); + init_completion(&block.b_wait); block.b_status = NLM_LCK_BLOCKED; block.b_next = nlm_blocked; nlm_blocked = █ @@ -69,7 +70,8 @@ * a 1 minute timeout would do. See the comment before * nlmclnt_lock for an explanation. */ - sleep_on_timeout(&block.b_wait, 30*HZ); + + wait_for_completion_timeout(&block.b_wait, 30*HZ); for (head = &nlm_blocked; *head; head = &(*head)->b_next) { if (*head == &block) { @@ -118,7 +120,7 @@ * wake up the caller. */ block->b_status = NLM_LCK_GRANTED; - wake_up(&block->b_wait); + complete(&block->b_wait); return nlm_granted; } @@ -233,7 +235,7 @@ for (block = nlm_blocked; block; block = block->b_next) { if (block->b_host == host) { block->b_status = NLM_LCK_DENIED_GRACE_PERIOD; - wake_up(&block->b_wait); + complete(&block->b_wait); } }