2005-03-06 10:39:26

by Domen Puncer

[permalink] [raw]
Subject: [patch 1/2] fs/vfs: replace schedule_timeout() with msleep()




Use msleep() instead of schedule_timeout() to guarantee the task
delays as expected.

Signed-off-by: Nishanth Aravamudan <[email protected]>
Signed-off-by: Domen Puncer <[email protected]>
---


kj-domen/fs/nfsd/vfs.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN fs/nfsd/vfs.c~msleep-fs_nfsd_vfs fs/nfsd/vfs.c
--- kj/fs/nfsd/vfs.c~msleep-fs_nfsd_vfs 2005-03-05 16:10:56.000000000 +0100
+++ kj-domen/fs/nfsd/vfs.c 2005-03-05 16:10:56.000000000 +0100
@@ -36,6 +36,7 @@
#include <linux/module.h>
#include <linux/namei.h>
#include <linux/vfs.h>
+#include <linux/delay.h>
#include <linux/sunrpc/svc.h>
#include <linux/nfsd/nfsd.h>
#ifdef CONFIG_NFSD_V3
@@ -968,8 +969,7 @@ nfsd_write(struct svc_rqst *rqstp, struc
if (atomic_read(&inode->i_writecount) > 1
|| (last_ino == inode->i_ino && last_dev == inode->i_sb->s_dev)) {
dprintk("nfsd: write defer %d\n", current->pid);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout((HZ+99)/100);
+ msleep(10);
dprintk("nfsd: write resume %d\n", current->pid);
}

_


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs