Skip to contentSkip to conversation

make xfs_buftarg_list static again

PATCH In review Adrian Bunk 3 participants 3 messages Feb 20, 2007 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 make xfs_buftarg_list static again

xfs_buftarg_list became global for no good reason.

---

fs/xfs/linux-2.6/xfs_buf.c renamed from fs/xfs/linux-2.6/xfs_buf.c.old +1 -1
@@ -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
#1 lore raw
Quoted 1 line · Adrian Bunk

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 ;)

Quoted 6 lines

---

fs/xfs/linux-2.6/xfs_buf.c line 1430

Quoted 8 lines
fs/xfs/linux-2.6/xfs_buf.c renamed from fs/xfs/linux-2.6/xfs_buf.c.old +1 -1
@@ -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.

Signature · 3 lines
Dave Chinner
Principal Engineer
SGI Australian Software Group
#2 lore raw
In reply to Adrian Bunk

Hi Adrian,

Quoted 2 lines · --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

Quoted 16 lines

---

fs/xfs/linux-2.6/xfs_buf.c renamed from fs/xfs/linux-2.6/xfs_buf.c.old +1 -1
@@ -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