aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2008-12-01 15:23:50 -0500
committerSteve French <sfrench@us.ibm.com>2008-12-25 21:29:09 -0500
commit954d7a1cf12158fed23dd8b0f3f563d5a5c97f28 (patch)
tree81152ead9083b2b8dbdcbccd92bb379e148c9e40 /fs/cifs/cifsfs.c
parent72ca545b2d83ac7de671bf66d2dbc214528b4c0c (diff)
cifs: make dnotify thread experimental code
Now that tasks sleeping in wait_for_response will time out on their own, we're not reliant on the dnotify thread to do this. Mark it as experimental code for now. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 7f87066ce29f..061a1dca987d 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -66,7 +66,9 @@ unsigned int sign_CIFS_PDUs = 1;
66extern struct task_struct *oplockThread; /* remove sparse warning */ 66extern struct task_struct *oplockThread; /* remove sparse warning */
67struct task_struct *oplockThread = NULL; 67struct task_struct *oplockThread = NULL;
68/* extern struct task_struct * dnotifyThread; remove sparse warning */ 68/* extern struct task_struct * dnotifyThread; remove sparse warning */
69#ifdef CONFIG_CIFS_EXPERIMENTAL
69static struct task_struct *dnotifyThread = NULL; 70static struct task_struct *dnotifyThread = NULL;
71#endif
70static const struct super_operations cifs_super_ops; 72static const struct super_operations cifs_super_ops;
71unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE; 73unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE;
72module_param(CIFSMaxBufSize, int, 0); 74module_param(CIFSMaxBufSize, int, 0);
@@ -1049,6 +1051,7 @@ static int cifs_oplock_thread(void *dummyarg)
1049 return 0; 1051 return 0;
1050} 1052}
1051 1053
1054#ifdef CONFIG_CIFS_EXPERIMENTAL
1052static int cifs_dnotify_thread(void *dummyarg) 1055static int cifs_dnotify_thread(void *dummyarg)
1053{ 1056{
1054 struct list_head *tmp; 1057 struct list_head *tmp;
@@ -1074,6 +1077,7 @@ static int cifs_dnotify_thread(void *dummyarg)
1074 1077
1075 return 0; 1078 return 0;
1076} 1079}
1080#endif
1077 1081
1078static int __init 1082static int __init
1079init_cifs(void) 1083init_cifs(void)
@@ -1151,16 +1155,20 @@ init_cifs(void)
1151 goto out_unregister_dfs_key_type; 1155 goto out_unregister_dfs_key_type;
1152 } 1156 }
1153 1157
1158#ifdef CONFIG_CIFS_EXPERIMENTAL
1154 dnotifyThread = kthread_run(cifs_dnotify_thread, NULL, "cifsdnotifyd"); 1159 dnotifyThread = kthread_run(cifs_dnotify_thread, NULL, "cifsdnotifyd");
1155 if (IS_ERR(dnotifyThread)) { 1160 if (IS_ERR(dnotifyThread)) {
1156 rc = PTR_ERR(dnotifyThread); 1161 rc = PTR_ERR(dnotifyThread);
1157 cERROR(1, ("error %d create dnotify thread", rc)); 1162 cERROR(1, ("error %d create dnotify thread", rc));
1158 goto out_stop_oplock_thread; 1163 goto out_stop_oplock_thread;
1159 } 1164 }
1165#endif
1160 1166
1161 return 0; 1167 return 0;
1162 1168
1169#ifdef CONFIG_CIFS_EXPERIMENTAL
1163 out_stop_oplock_thread: 1170 out_stop_oplock_thread:
1171#endif
1164 kthread_stop(oplockThread); 1172 kthread_stop(oplockThread);
1165 out_unregister_dfs_key_type: 1173 out_unregister_dfs_key_type:
1166#ifdef CONFIG_CIFS_DFS_UPCALL 1174#ifdef CONFIG_CIFS_DFS_UPCALL
@@ -1199,8 +1207,10 @@ exit_cifs(void)
1199 cifs_destroy_inodecache(); 1207 cifs_destroy_inodecache();
1200 cifs_destroy_mids(); 1208 cifs_destroy_mids();
1201 cifs_destroy_request_bufs(); 1209 cifs_destroy_request_bufs();
1202 kthread_stop(oplockThread); 1210#ifdef CONFIG_CIFS_EXPERIMENTAL
1203 kthread_stop(dnotifyThread); 1211 kthread_stop(dnotifyThread);
1212#endif
1213 kthread_stop(oplockThread);
1204} 1214}
1205 1215
1206MODULE_AUTHOR("Steve French <sfrench@us.ibm.com>"); 1216MODULE_AUTHOR("Steve French <sfrench@us.ibm.com>");