aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-03-23 14:40:53 -0400
committerJeff Layton <jlayton@redhat.com>2012-03-23 14:40:53 -0400
commitda472fc847e9d8c9da69b09ce0ab975b24f9b894 (patch)
treef5b2c4e187aa39e011c758f8e94d2d2b3d296384 /fs/cifs/cifsfs.c
parent7c9421e1a9ce8d17816f480c3a5b4f2609442cd5 (diff)
cifs: add new cifsiod_wq workqueue
...and convert existing cifs users of system_nrt_wq to use that instead. Also, make it freezable, and set WQ_MEM_RECLAIM since we use it to deal with write reply handling. Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index eee522c56ef0..d34212822444 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -85,6 +85,8 @@ extern mempool_t *cifs_sm_req_poolp;
85extern mempool_t *cifs_req_poolp; 85extern mempool_t *cifs_req_poolp;
86extern mempool_t *cifs_mid_poolp; 86extern mempool_t *cifs_mid_poolp;
87 87
88struct workqueue_struct *cifsiod_wq;
89
88static int 90static int
89cifs_read_super(struct super_block *sb) 91cifs_read_super(struct super_block *sb)
90{ 92{
@@ -1111,9 +1113,15 @@ init_cifs(void)
1111 cFYI(1, "cifs_max_pending set to max of %u", CIFS_MAX_REQ); 1113 cFYI(1, "cifs_max_pending set to max of %u", CIFS_MAX_REQ);
1112 } 1114 }
1113 1115
1116 cifsiod_wq = alloc_workqueue("cifsiod", WQ_FREEZABLE|WQ_MEM_RECLAIM, 0);
1117 if (!cifsiod_wq) {
1118 rc = -ENOMEM;
1119 goto out_clean_proc;
1120 }
1121
1114 rc = cifs_fscache_register(); 1122 rc = cifs_fscache_register();
1115 if (rc) 1123 if (rc)
1116 goto out_clean_proc; 1124 goto out_destroy_wq;
1117 1125
1118 rc = cifs_init_inodecache(); 1126 rc = cifs_init_inodecache();
1119 if (rc) 1127 if (rc)
@@ -1161,6 +1169,8 @@ out_destroy_inodecache:
1161 cifs_destroy_inodecache(); 1169 cifs_destroy_inodecache();
1162out_unreg_fscache: 1170out_unreg_fscache:
1163 cifs_fscache_unregister(); 1171 cifs_fscache_unregister();
1172out_destroy_wq:
1173 destroy_workqueue(cifsiod_wq);
1164out_clean_proc: 1174out_clean_proc:
1165 cifs_proc_clean(); 1175 cifs_proc_clean();
1166 return rc; 1176 return rc;
@@ -1183,6 +1193,7 @@ exit_cifs(void)
1183 cifs_destroy_mids(); 1193 cifs_destroy_mids();
1184 cifs_destroy_inodecache(); 1194 cifs_destroy_inodecache();
1185 cifs_fscache_unregister(); 1195 cifs_fscache_unregister();
1196 destroy_workqueue(cifsiod_wq);
1186 cifs_proc_clean(); 1197 cifs_proc_clean();
1187} 1198}
1188 1199