summaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2008-12-01 07:09:36 -0500
committerSteve French <sfrench@us.ibm.com>2008-12-26 02:29:09 +0000
commit72ca545b2d83ac7de671bf66d2dbc214528b4c0c (patch)
tree660fd7308d20a6e3dd30789d0107393cca0c9464 /fs/cifs/connect.c
parent0468a2cf914e79442b8309ce62e3f861599d8cab (diff)
cifs: convert tcpSem to a mutex
Mutexes are preferred for single-holder semaphores... Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 701daf411a4..61b68a0ee2f 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -156,7 +156,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
}
read_unlock(&cifs_tcp_ses_lock);
/* do not want to be sending data on a socket we are freeing */
- down(&server->tcpSem);
+ mutex_lock(&server->srv_mutex);
if (server->ssocket) {
cFYI(1, ("State: 0x%x Flags: 0x%lx", server->ssocket->state,
server->ssocket->flags));
@@ -182,7 +182,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
}
}
spin_unlock(&GlobalMid_Lock);
- up(&server->tcpSem);
+ mutex_unlock(&server->srv_mutex);
while ((server->tcpStatus != CifsExiting) &&
(server->tcpStatus != CifsGood)) {
@@ -2175,7 +2175,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
to the struct since the kernel thread not created yet
so no need to spinlock this init of tcpStatus */
srvTcp->tcpStatus = CifsNew;
- init_MUTEX(&srvTcp->tcpSem);
+ mutex_init(&srvTcp->srv_mutex);
/*
* since we're in a cifs function already, we know that