]> err.no Git - linux-2.6/commitdiff
[CIFS] Add support for suspend
authorSteve French <sfrench@us.ibm.com>
Tue, 30 Aug 2005 20:10:14 +0000 (13:10 -0700)
committerSteve French <sfrench@us.ibm.com>
Tue, 30 Aug 2005 20:10:14 +0000 (13:10 -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
---

 fs/cifs/CHANGES   |    3 ++-
 fs/cifs/cifsfs.c  |    4 ++++
 fs/cifs/connect.c |    2 ++
 3 files changed, 8 insertions(+), 1 deletions(-)

fs/cifs/CHANGES
fs/cifs/cifsfs.c
fs/cifs/connect.c

index 340b4ffb3493bc39486cc98374d1ed727082b02a..6c73f020ef400bc8a2377fdd9eb51c0c2dc5d810 100644 (file)
@@ -2,7 +2,8 @@ Version 1.36
 ------------
 Add support for mounting to older pre-CIFS servers such as Windows9x and ME.
 For these older servers, add option for passing netbios name of server in
-on mount (servernetbiosname).
+on mount (servernetbiosname).  Add suspend support for power management, to
+avoid cifsd thread preventing software suspend from working.
 Add mount option for disabling the default behavior of sending byte range lock
 requests to the server (necessary for certain applications which break with
 mandatory lock behavior such as Evolution), and also mount option for
index d77abe236a670b1e830df5e091070ba7a4d46877..43fb2aafa528cee52e2b6feb826d32cf276c1a3e 100644 (file)
@@ -784,6 +784,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);  
@@ -848,6 +850,8 @@ static int cifs_dnotify_thread(void * dummyarg)
 
        dnotifyThread = current;
        do {
+               if(try_to_freeze())
+                       continue;
                set_current_state(TASK_INTERRUPTIBLE);
                schedule_timeout(39*HZ);
        } while(!signal_pending(current));
index c75bae1242dcceaeb2873db3fc075ced44cf0c89..134195cc40731c0530160cb8497b17e6a53b51d0 100644 (file)
@@ -355,6 +355,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) {