2007-02-20 00:08:52

by Adrian Bunk

[permalink] [raw]
Subject: [2.6 patch] make xfs_buftarg_list static again

xfs_buftarg_list became global for no good reason.

Signed-off-by: Adrian Bunk <[email protected]>

---
--- linux-2.6.20-mm2/fs/xfs/linux-2.6/xfs_buf.c.old 2007-02-18 22:55:40.000000000 +0100
+++ linux-2.6.20-mm2/fs/xfs/linux-2.6/xfs_buf.c 2007-02-18 22:56:08.000000000 +0100
@@ -1424,7 +1424,7 @@
/*
* buftarg list for delwrite queue processing
*/
-LIST_HEAD(xfs_buftarg_list);
+static LIST_HEAD(xfs_buftarg_list);
static DEFINE_SPINLOCK(xfs_buftarg_lock);

STATIC void


2007-02-20 01:01:07

by David Chinner

[permalink] [raw]
Subject: Re: [2.6 patch] make xfs_buftarg_list static again

On Tue, Feb 20, 2007 at 01:07:47AM +0100, Adrian Bunk wrote:
> xfs_buftarg_list became global for no good reason.

Fallout from a much larger patch. Looks like there were a couple
of STATIC -> static conversions stuffed up. Thanks for catching
this, Adrian.

Tim - another one for you ;)

> Signed-off-by: Adrian Bunk <[email protected]>
>
> ---
> --- linux-2.6.20-mm2/fs/xfs/linux-2.6/xfs_buf.c.old 2007-02-18 22:55:40.000000000 +0100
> +++ linux-2.6.20-mm2/fs/xfs/linux-2.6/xfs_buf.c 2007-02-18 22:56:08.000000000 +0100
> @@ -1424,7 +1424,7 @@
> /*
> * buftarg list for delwrite queue processing
> */
> -LIST_HEAD(xfs_buftarg_list);
> +static LIST_HEAD(xfs_buftarg_list);
> static DEFINE_SPINLOCK(xfs_buftarg_lock);
>
> STATIC void

Cheers,

Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group

2007-02-20 01:35:19

by Timothy Shimmin

[permalink] [raw]
Subject: Re: [xfs-masters] [2.6 patch] make xfs_buftarg_list static again

Hi Adrian,

--On 20 February 2007 1:07:47 AM +0100 Adrian Bunk <[email protected]> wrote:

> xfs_buftarg_list became global for no good reason.
>

That's true. I'll make the change for git if Dave has no objections.

It happened because in the SGI tree we want it global for use in kdb by xfsidbg.o,
and that used to happen in the CONFIG_XFS_DEBUG case where STATIC would define
to nothing - looks like it is global always in our tree now since Dave's patch.
i.e. it was actually becoming global previously via STATIC on CONFIG_XFS_DEBUG
but one wouldn't have noticed that :) AFAICT.
Hmmm, I'll talk to Dave about this.

--Tim

> Signed-off-by: Adrian Bunk <[email protected]>
>
> ---
> --- linux-2.6.20-mm2/fs/xfs/linux-2.6/xfs_buf.c.old 2007-02-18 22:55:40.000000000 +0100
> +++ linux-2.6.20-mm2/fs/xfs/linux-2.6/xfs_buf.c 2007-02-18 22:56:08.000000000 +0100
> @@ -1424,7 +1424,7 @@
> /*
> * buftarg list for delwrite queue processing
> */
> -LIST_HEAD(xfs_buftarg_list);
> +static LIST_HEAD(xfs_buftarg_list);
> static DEFINE_SPINLOCK(xfs_buftarg_lock);
>
> STATIC void
>
>