[PATCH] cifs: Add support for suspend
authorSteve French <sfrench@us.ibm.com>
Wed, 31 Aug 2005 03:10:14 +0000 (20:10 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 23 Sep 2005 18:37:53 +0000 (11:37 -0700)
cifsd had been preventing software suspend from completing.

Signed-off-by: pavel@suse.de
Signed-off-by: Steve French <sfrench@us.ibm.com> lightly modified
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/cifs/cifsfs.c
fs/cifs/connect.c

index 8cc23e7..1ebf7da 100644 (file)
@@ -781,6 +781,8 @@ static int cifs_oplock_thread(void * dummyarg)
 
        oplockThread = current;
        do {
+               if (try_to_freeze()) 
+                       continue;
                set_current_state(TASK_INTERRUPTIBLE);
                
                schedule_timeout(1*HZ);  
index 2335f14..4736015 100644 (file)
@@ -344,6 +344,8 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
        }
 
        while (server->tcpStatus != CifsExiting) {
+               if (try_to_freeze())
+                       continue;
                if (bigbuf == NULL) {
                        bigbuf = cifs_buf_get();
                        if(bigbuf == NULL) {