cifs: remove dnotify thread code

cifs: remove dnotify thread code

Al Viro recently removed the dir_notify code from the kernel along with
the CIFS code that used it. We can also get rid of the dnotify thread
as well.

In actuality, it never had anything to do with dir_notify anyway. All
it did was unnecessarily wake up all the tasks waiting on the response
queues every 15s. Previously that happened to prevent tasks from hanging
indefinitely when the server went unresponsive, but we put those to
sleep with proper timeouts now so there's no reason to keep this around.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>

authored by Jeff Layton and committed by Steve French 5144ebf4 2d6d589d

-47
-47
fs/cifs/cifsfs.c
··· 66 extern struct task_struct *oplockThread; /* remove sparse warning */ 67 struct task_struct *oplockThread = NULL; 68 /* extern struct task_struct * dnotifyThread; remove sparse warning */ 69 - #ifdef CONFIG_CIFS_EXPERIMENTAL 70 - static struct task_struct *dnotifyThread = NULL; 71 - #endif 72 static const struct super_operations cifs_super_ops; 73 unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE; 74 module_param(CIFSMaxBufSize, int, 0); ··· 1038 return 0; 1039 } 1040 1041 - #ifdef CONFIG_CIFS_EXPERIMENTAL 1042 - static int cifs_dnotify_thread(void *dummyarg) 1043 - { 1044 - struct list_head *tmp; 1045 - struct TCP_Server_Info *server; 1046 - 1047 - do { 1048 - if (try_to_freeze()) 1049 - continue; 1050 - set_current_state(TASK_INTERRUPTIBLE); 1051 - schedule_timeout(15*HZ); 1052 - /* check if any stuck requests that need 1053 - to be woken up and wakeq so the 1054 - thread can wake up and error out */ 1055 - read_lock(&cifs_tcp_ses_lock); 1056 - list_for_each(tmp, &cifs_tcp_ses_list) { 1057 - server = list_entry(tmp, struct TCP_Server_Info, 1058 - tcp_ses_list); 1059 - if (atomic_read(&server->inFlight)) 1060 - wake_up_all(&server->response_q); 1061 - } 1062 - read_unlock(&cifs_tcp_ses_lock); 1063 - } while (!kthread_should_stop()); 1064 - 1065 - return 0; 1066 - } 1067 - #endif 1068 - 1069 static int __init 1070 init_cifs(void) 1071 { ··· 1114 goto out_unregister_dfs_key_type; 1115 } 1116 1117 - #ifdef CONFIG_CIFS_EXPERIMENTAL 1118 - dnotifyThread = kthread_run(cifs_dnotify_thread, NULL, "cifsdnotifyd"); 1119 - if (IS_ERR(dnotifyThread)) { 1120 - rc = PTR_ERR(dnotifyThread); 1121 - cERROR(1, ("error %d create dnotify thread", rc)); 1122 - goto out_stop_oplock_thread; 1123 - } 1124 - #endif 1125 - 1126 return 0; 1127 1128 - #ifdef CONFIG_CIFS_EXPERIMENTAL 1129 - out_stop_oplock_thread: 1130 - #endif 1131 - kthread_stop(oplockThread); 1132 out_unregister_dfs_key_type: 1133 #ifdef CONFIG_CIFS_DFS_UPCALL 1134 unregister_key_type(&key_type_dns_resolver); ··· 1153 cifs_destroy_inodecache(); 1154 cifs_destroy_mids(); 1155 cifs_destroy_request_bufs(); 1156 - #ifdef CONFIG_CIFS_EXPERIMENTAL 1157 - kthread_stop(dnotifyThread); 1158 - #endif 1159 kthread_stop(oplockThread); 1160 } 1161
··· 66 extern struct task_struct *oplockThread; /* remove sparse warning */ 67 struct task_struct *oplockThread = NULL; 68 /* extern struct task_struct * dnotifyThread; remove sparse warning */ 69 static const struct super_operations cifs_super_ops; 70 unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE; 71 module_param(CIFSMaxBufSize, int, 0); ··· 1041 return 0; 1042 } 1043 1044 static int __init 1045 init_cifs(void) 1046 { ··· 1145 goto out_unregister_dfs_key_type; 1146 } 1147 1148 return 0; 1149 1150 out_unregister_dfs_key_type: 1151 #ifdef CONFIG_CIFS_DFS_UPCALL 1152 unregister_key_type(&key_type_dns_resolver); ··· 1197 cifs_destroy_inodecache(); 1198 cifs_destroy_mids(); 1199 cifs_destroy_request_bufs(); 1200 kthread_stop(oplockThread); 1201 } 1202