Directly use wait-queues instead of the deprecated
sleep_on_timeout(). Since the sleep in this function is unconditional,
wait_event_timeout() does not appear to be appropriate. Patch is
compile-tested.

Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/fs/lockd/clntlock.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -puN fs/lockd/clntlock.c~sleep_on-fs_lockd_clntlock fs/lockd/clntlock.c
--- kj/fs/lockd/clntlock.c~sleep_on-fs_lockd_clntlock   2005-03-05 
16:13:13.000000000 +0100
+++ kj-domen/fs/lockd/clntlock.c        2005-03-05 16:13:13.000000000 +0100
@@ -14,6 +14,7 @@
 #include <linux/sunrpc/svc.h>
 #include <linux/lockd/lockd.h>
 #include <linux/smp_lock.h>
+#include <linux/wait.h>
 
 #define NLMDBG_FACILITY                NLMDBG_CLIENT
 
@@ -47,6 +48,7 @@ static struct nlm_wait *      nlm_blocked;
 int
 nlmclnt_block(struct nlm_host *host, struct file_lock *fl, u32 *statp)
 {
+       DEFINE_WAIT(wait);
        struct nlm_wait block, **head;
        int             err;
        u32             pstate;
@@ -69,7 +71,9 @@ nlmclnt_block(struct nlm_host *host, str
         * a 1 minute timeout would do. See the comment before
         * nlmclnt_lock for an explanation.
         */
-       sleep_on_timeout(&block.b_wait, 30*HZ);
+       prepare_to_wait(&block.b_wait, &wait, TASK_UNINTERRUPTIBLE);
+       schedule_timeout(30*HZ);
+       finish_wait(&block.b_wait, &wait);
 
        for (head = &nlm_blocked; *head; head = &(*head)->b_next) {
                if (*head == &block) {
_
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to