FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 01-05-2009, 08:25 AM
Steven Whitehouse
 
Default fs/gfs2: Use DEFINE_SPINLOCK

Hi,

Now added to the GFS2 -nmw git tree. Thanks,

Steve.

On Thu, 2008-12-25 at 15:35 +0100, Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
>
> SPIN_LOCK_UNLOCKED is deprecated. The following makes the change suggested
> in Documentation/spinlocks.txt
>
> The semantic patch that makes this change is as follows:
> (http://www.emn.fr/x-info/coccinelle/)
>
> // <smpl>
> @@
> declarer name DEFINE_SPINLOCK;
> identifier xxx_lock;
> @@
>
> - spinlock_t xxx_lock = SPIN_LOCK_UNLOCKED;
> + DEFINE_SPINLOCK(xxx_lock);
> // </smpl>
>
> Signed-off-by: Julia Lawall <julia@diku.dk>
>
> ---
> diff -u -p a/fs/gfs2/glock.c b/fs/gfs2/glock.c
> --- a/fs/gfs2/glock.c
> +++ b/fs/gfs2/glock.c
> @@ -65,7 +65,7 @@ static struct dentry *gfs2_root;
> static struct workqueue_struct *glock_workqueue;
> static LIST_HEAD(lru_list);
> static atomic_t lru_count = ATOMIC_INIT(0);
> -static spinlock_t lru_lock = SPIN_LOCK_UNLOCKED;
> +static DEFINE_SPINLOCK(lru_lock);
>
> #define GFS2_GL_HASH_SHIFT 15
> #define GFS2_GL_HASH_SIZE (1 << GFS2_GL_HASH_SHIFT)
 

Thread Tools




All times are GMT. The time now is 05:46 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org