Commit 4904cd2a authored by Thomas Gleixner's avatar Thomas Gleixner

smbfs: Convert server->sem to mutex

server->sem is used as mutex so make it a mutex.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
parent 70ced5d1
......@@ -536,7 +536,7 @@ static int smb_fill_super(struct super_block *sb, void *raw_data, int silent)
server->mnt = NULL;
server->sock_file = NULL;
init_waitqueue_head(&server->conn_wq);
init_MUTEX(&server->sem);
mutex_init(&server->mutex);
INIT_LIST_HEAD(&server->entry);
INIT_LIST_HEAD(&server->xmitq);
INIT_LIST_HEAD(&server->recvq);
......
......@@ -57,7 +57,7 @@ struct smb_sb_info {
struct smb_conn_opt opt;
wait_queue_head_t conn_wq;
int conn_complete;
struct semaphore sem;
struct mutex mutex;
unsigned char header[SMB_HEADER_LEN + 20*2 + 2];
u32 header_len;
......@@ -79,19 +79,19 @@ struct smb_sb_info {
static inline int
smb_lock_server_interruptible(struct smb_sb_info *server)
{
return down_interruptible(&(server->sem));
return mutex_lock_interruptible(&server->mutex);
}
static inline void
smb_lock_server(struct smb_sb_info *server)
{
down(&(server->sem));
mutex_lock(&server->mutex);
}
static inline void
smb_unlock_server(struct smb_sb_info *server)
{
up(&(server->sem));
mutex_unlock(&server->mutex);
}
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment