[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100129221453.GA16158@infradead.org>
Date: Fri, 29 Jan 2010 17:14:53 -0500
From: Christoph Hellwig <hch@...radead.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
Christoph Hellwig <hch@...radead.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...e.hu>, Al Viro <viro@...iv.linux.org.uk>,
Jeff Layton <jlayton@...hat.com>,
Steve French <sfrench@...ibm.com>
Subject: Re: [patch 01/10] smbfs: Convert server->sem to mutex
On Fri, Jan 29, 2010 at 08:38:34PM -0000, Thomas Gleixner wrote:
> The semaphore server->sem is used as mutex. Rename it to server->mutex
> and convert it to a real mutex.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: Al Viro <viro@...iv.linux.org.uk>
> Cc: Jeff Layton <jlayton@...hat.com>
> Cc: Steve French <sfrench@...ibm.com>
Looks good,
Reviewed-by: Christoph Hellwig <hch@....de>
> 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);
> }
Eventually someone should also kill this useless wrappers, but let's do
one thing at a time for now.
--
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