[patch 1/1] fs/transport: replace schedule_timeout() with msleep()

domen at coderock.org domen at coderock.org
Sun Mar 6 10:38:57 GMT 2005




Use msleep() instead of schedule_timeout() to guarantee the task
delays as expected. The current code uses TASK_INTERRUPTIBLE, but does not check
for signals, so I believe the change to msleep() is acceptable.

Signed-off-by: Nishanth Aravamudan <nacc at us.ibm.com>
Signed-off-by: Domen Puncer <domen at coderock.org>
---


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

diff -puN fs/cifs/transport.c~msleep-fs_cifs_transport fs/cifs/transport.c
--- kj/fs/cifs/transport.c~msleep-fs_cifs_transport	2005-03-05 16:10:54.000000000 +0100
+++ kj-domen/fs/cifs/transport.c	2005-03-05 16:10:54.000000000 +0100
@@ -26,6 +26,7 @@
 #include <asm/uaccess.h>
 #include <asm/processor.h>
 #include <linux/mempool.h>
+#include <linux/delay.h>
 #include "cifspdu.h"
 #include "cifsglob.h"
 #include "cifsproto.h"
@@ -156,8 +157,7 @@ smb_send(struct socket *ssocket, struct 
 				rc = -EAGAIN;
 				break;
 			}
-			set_current_state(TASK_INTERRUPTIBLE);
-			schedule_timeout(HZ/2);
+			msleep(500);
 			continue;
 		}
 		if (rc < 0) 
_


More information about the samba-technical mailing list