diff options
author | Jeff Layton <jlayton@redhat.com> | 2008-12-01 15:23:50 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-12-25 21:29:09 -0500 |
commit | 954d7a1cf12158fed23dd8b0f3f563d5a5c97f28 (patch) | |
tree | 81152ead9083b2b8dbdcbccd92bb379e148c9e40 | |
parent | 72ca545b2d83ac7de671bf66d2dbc214528b4c0c (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>
-rw-r--r-- | fs/cifs/cifsfs.c | 12 |
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; | |||
66 | extern struct task_struct *oplockThread; /* remove sparse warning */ | 66 | extern struct task_struct *oplockThread; /* remove sparse warning */ |
67 | struct task_struct *oplockThread = NULL; | 67 | struct 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 | ||
69 | static struct task_struct *dnotifyThread = NULL; | 70 | static struct task_struct *dnotifyThread = NULL; |
71 | #endif | ||
70 | static const struct super_operations cifs_super_ops; | 72 | static const struct super_operations cifs_super_ops; |
71 | unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE; | 73 | unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE; |
72 | module_param(CIFSMaxBufSize, int, 0); | 74 | module_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 | ||
1052 | static int cifs_dnotify_thread(void *dummyarg) | 1055 | static 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 | ||
1078 | static int __init | 1082 | static int __init |
1079 | init_cifs(void) | 1083 | init_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 | ||
1206 | MODULE_AUTHOR("Steve French <sfrench@us.ibm.com>"); | 1216 | MODULE_AUTHOR("Steve French <sfrench@us.ibm.com>"); |