[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100910084629.239dc62f@corrin.poochiereds.net>
Date: Fri, 10 Sep 2010 08:46:29 -0400
From: Jeff Layton <jlayton@...hat.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <peterz@...radead.org>,
Christoph Hellwig <hch@...radead.org>,
Al Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org
Subject: Re: [patch 15/30] smbfs: Convert server->sem to mutex
On Tue, 07 Sep 2010 14:32:52 -0000
Thomas Gleixner <tglx@...utronix.de> wrote:
> server->sem is used as mutex so make it a mutex.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: Al Viro <viro@...iv.linux.org.uk>
> Cc: linux-fsdevel@...r.kernel.org
>
> ---
> fs/smbfs/inode.c | 2 +-
> include/linux/smb_fs_sb.h | 8 ++++----
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> Index: linux-2.6/fs/smbfs/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/smbfs/inode.c
> +++ linux-2.6/fs/smbfs/inode.c
> @@ -536,7 +536,7 @@ static int smb_fill_super(struct super_b
> 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);
> Index: linux-2.6/include/linux/smb_fs_sb.h
> ===================================================================
> --- linux-2.6.orig/include/linux/smb_fs_sb.h
> +++ linux-2.6/include/linux/smb_fs_sb.h
> @@ -58,7 +58,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;
> @@ -82,19 +82,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
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
Seems harmless...
Acked-by: Jeff Layton <jlayton@...hat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists