Skip to content

Commit

Permalink
[CIFS] cleanup cifsd completion
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steve French committed May 6, 2008
1 parent dea570e commit cf432eb
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
#define CIFS_PORT 445
#define RFC1001_PORT 139

static DECLARE_COMPLETION(cifsd_complete);

extern void SMBNTencrypt(unsigned char *passwd, unsigned char *c8,
unsigned char *p24);

Expand Down Expand Up @@ -356,7 +354,6 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
atomic_inc(&tcpSesAllocCount);
length = tcpSesAllocCount.counter;
write_unlock(&GlobalSMBSeslock);
complete(&cifsd_complete);
if (length > 1)
mempool_resize(cifs_req_poolp, length + cifs_min_rcv,
GFP_KERNEL);
Expand Down Expand Up @@ -1980,7 +1977,6 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
kfree(srvTcp->hostname);
goto out;
}
wait_for_completion(&cifsd_complete);
rc = 0;
memcpy(srvTcp->workstation_RFC1001_name,
volume_info.source_rfc1001_name, 16);
Expand Down Expand Up @@ -3553,8 +3549,6 @@ cifs_umount(struct super_block *sb, struct cifs_sb_info *cifs_sb)
cifs_sb->prepathlen = 0;
cifs_sb->prepath = NULL;
kfree(tmp);
if (ses)
schedule_timeout_interruptible(msecs_to_jiffies(500));
if (ses)
sesInfoFree(ses);

Expand Down

0 comments on commit cf432eb

Please sign in to comment.