diff options
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 51548ed2e9cc..2a13a2bac8f1 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/seq_file.h> | 32 | #include <linux/seq_file.h> |
33 | #include <linux/vfs.h> | 33 | #include <linux/vfs.h> |
34 | #include <linux/mempool.h> | 34 | #include <linux/mempool.h> |
35 | #include <linux/delay.h> | ||
35 | #include "cifsfs.h" | 36 | #include "cifsfs.h" |
36 | #include "cifspdu.h" | 37 | #include "cifspdu.h" |
37 | #define DECLARE_GLOBALS_HERE | 38 | #define DECLARE_GLOBALS_HERE |
@@ -429,6 +430,11 @@ static void cifs_umount_begin(struct super_block * sblock) | |||
429 | { | 430 | { |
430 | cFYI(1,("wake up tasks now - umount begin not complete")); | 431 | cFYI(1,("wake up tasks now - umount begin not complete")); |
431 | wake_up_all(&tcon->ses->server->request_q); | 432 | wake_up_all(&tcon->ses->server->request_q); |
433 | wake_up_all(&tcon->ses->server->response_q); | ||
434 | msleep(1); /* yield */ | ||
435 | /* we have to kick the requests once more */ | ||
436 | wake_up_all(&tcon->ses->server->response_q); | ||
437 | msleep(1); | ||
432 | } | 438 | } |
433 | /* BB FIXME - finish add checks for tidStatus BB */ | 439 | /* BB FIXME - finish add checks for tidStatus BB */ |
434 | 440 | ||
@@ -895,6 +901,9 @@ static int cifs_oplock_thread(void * dummyarg) | |||
895 | 901 | ||
896 | static int cifs_dnotify_thread(void * dummyarg) | 902 | static int cifs_dnotify_thread(void * dummyarg) |
897 | { | 903 | { |
904 | struct list_head *tmp; | ||
905 | struct cifsSesInfo *ses; | ||
906 | |||
898 | daemonize("cifsdnotifyd"); | 907 | daemonize("cifsdnotifyd"); |
899 | allow_signal(SIGTERM); | 908 | allow_signal(SIGTERM); |
900 | 909 | ||
@@ -903,7 +912,19 @@ static int cifs_dnotify_thread(void * dummyarg) | |||
903 | if(try_to_freeze()) | 912 | if(try_to_freeze()) |
904 | continue; | 913 | continue; |
905 | set_current_state(TASK_INTERRUPTIBLE); | 914 | set_current_state(TASK_INTERRUPTIBLE); |
906 | schedule_timeout(39*HZ); | 915 | schedule_timeout(15*HZ); |
916 | read_lock(&GlobalSMBSeslock); | ||
917 | /* check if any stuck requests that need | ||
918 | to be woken up and wakeq so the | ||
919 | thread can wake up and error out */ | ||
920 | list_for_each(tmp, &GlobalSMBSessionList) { | ||
921 | ses = list_entry(tmp, struct cifsSesInfo, | ||
922 | cifsSessionList); | ||
923 | if(ses && ses->server && | ||
924 | atomic_read(&ses->server->inFlight)) | ||
925 | wake_up_all(&ses->server->response_q); | ||
926 | } | ||
927 | read_unlock(&GlobalSMBSeslock); | ||
907 | } while(!signal_pending(current)); | 928 | } while(!signal_pending(current)); |
908 | complete_and_exit (&cifs_dnotify_exited, 0); | 929 | complete_and_exit (&cifs_dnotify_exited, 0); |
909 | } | 930 | } |