Skip to content

Commit cf432eb

Browse files
author
Steve French
committed
[CIFS] cleanup cifsd completion
Was a holdover from the old kernel_thread based cifsd code. We needed to know that the thread had set the task variable before proceeding. Now that kthread_run returns the new task, this doesn't appear to be needed anymore. As best I can tell, this sleep was intended to try to prevent cifs_umount from freeing the cifsSesInfo struct before cifsd had exited. Now that cifsd is using the kthread API, we know that when kthread_stop returns that cifsd has exited, so I don't think this is needed any longer. Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: Christop Hellwig <hch@infradead.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
1 parent dea570e commit cf432eb

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

‎fs/cifs/connect.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@
4949
#define CIFS_PORT 445
5050
#define RFC1001_PORT 139
5151

52-
static DECLARE_COMPLETION(cifsd_complete);
53-
5452
extern void SMBNTencrypt(unsigned char *passwd, unsigned char *c8,
5553
unsigned char *p24);
5654

@@ -356,7 +354,6 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
356354
atomic_inc(&tcpSesAllocCount);
357355
length = tcpSesAllocCount.counter;
358356
write_unlock(&GlobalSMBSeslock);
359-
complete(&cifsd_complete);
360357
if (length > 1)
361358
mempool_resize(cifs_req_poolp, length + cifs_min_rcv,
362359
GFP_KERNEL);
@@ -1980,7 +1977,6 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
19801977
kfree(srvTcp->hostname);
19811978
goto out;
19821979
}
1983-
wait_for_completion(&cifsd_complete);
19841980
rc = 0;
19851981
memcpy(srvTcp->workstation_RFC1001_name,
19861982
volume_info.source_rfc1001_name, 16);
@@ -3553,8 +3549,6 @@ cifs_umount(struct super_block *sb, struct cifs_sb_info *cifs_sb)
35533549
cifs_sb->prepathlen = 0;
35543550
cifs_sb->prepath = NULL;
35553551
kfree(tmp);
3556-
if (ses)
3557-
schedule_timeout_interruptible(msecs_to_jiffies(500));
35583552
if (ses)
35593553
sesInfoFree(ses);
35603554

0 commit comments

Comments
 (0)