All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Aravamudan <nacc@us.ibm.com>
To: kernel-janitors@vger.kernel.org
Subject: [Kernel-janitors] [PATCH] nbd: replace schedule_timeout() with
Date: Wed, 21 Jul 2004 21:19:05 +0000	[thread overview]
Message-ID: <20040721211905.GJ1906@us.ibm.com> (raw)
In-Reply-To: <20040719214405.GB5372@us.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]

Please find below the corrected patch, as the previous one would not
compile. Thanks.

I would appreciate any comments from the janitors list.


Applys-to: 2.6.7

Description: Uses msleep() instead of schedule_timeout() to guarantee
the task delays at least the desired time amount.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>


--- linux-vanilla/drivers/block/nbd.c	2004-06-16 05:19:01.000000000 +0000
+++ linux-dev/drivers/block/nbd.c	2004-07-21 16:51:48.000000000 +0000
@@ -54,6 +54,7 @@
 #include <linux/errno.h>
 #include <linux/file.h>
 #include <linux/ioctl.h>
+#include <linux/delay.h>
 #include <net/sock.h>
 
 #include <linux/devfs_fs_kernel.h>
@@ -139,8 +140,7 @@ static void nbd_end_request(struct reque
 		spin_unlock(&lo->queue_lock);
 		printk(KERN_DEBUG "%s: request %p still in use (%d), waiting\n",
 		    lo->disk->disk_name, req, req->ref_count);
-		set_current_state(TASK_UNINTERRUPTIBLE);
-		schedule_timeout(HZ); /* wait a second */
+		msleep(1000);
 		spin_lock(&lo->queue_lock);
 	}
 	spin_unlock(&lo->queue_lock);

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

      reply	other threads:[~2004-07-21 21:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-19 21:44 [Kernel-janitors] [PATCH] nbd: replace schedule_timeout() with Nishanth Aravamudan
2004-07-21 21:19 ` Nishanth Aravamudan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040721211905.GJ1906@us.ibm.com \
    --to=nacc@us.ibm.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.