cifs: fix a regression in cifs umount codepath
commit39493f2809c5d4ee52ab118e0197644ad9490d13
authorJeff Layton <jlayton@redhat.com>
Wed, 10 Dec 2008 11:44:29 +0000 (10 06:44 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 13 Dec 2008 23:29:34 +0000 (13 15:29 -0800)
treec997b169c0f4e280a4d24958d78205cddcccbc65
parent631867888f51ec9dc40bc8f7cb43cc39a6892158
cifs: fix a regression in cifs umount codepath

backport of 469ee614aaa367d9cde01cbdd2027212f56c6cc6 upstream.

Several cifs patches were added to 2.6.27.8 to fix some races in the
mount/umount codepath. When this was done, a couple of prerequisite
patches were missed causing a minor regression.

When the last cifs mount to a server goes away, the kthread that manages
the socket is supposed to come down. The patches that went into 2.6.27.8
removed the kthread_stop calls that used to take down these threads, but
left the thread function expecting them. This made the thread stay up
even after the last mount was gone.

This patch should fix up this regression and also prevent a possible
race where a dead task could be signalled.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Cc: Suresh Jayaraman <sjayaraman@suse.de>
Acked-by: Steve French <smfrench@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/cifs/connect.c