]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
[XFS] Remove spin.h
authorEric Sandeen <sandeen@sandeen.net>
Thu, 11 Oct 2007 07:43:56 +0000 (17:43 +1000)
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Thu, 7 Feb 2008 05:47:45 +0000 (16:47 +1100)
remove spinlock init abstraction macro in spin.h, remove the callers, and
remove the file. Move no-op spinlock_destroy to xfs_linux.h Cleanup
spinlock locals in xfs_mount.c

SGI-PV: 970382
SGI-Modid: xfs-linux-melb:xfs-kern:29751a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
fs/xfs/linux-2.6/spin.h [deleted file]
fs/xfs/linux-2.6/xfs_buf.c
fs/xfs/linux-2.6/xfs_linux.h
fs/xfs/quota/xfs_qm.c
fs/xfs/support/debug.c
fs/xfs/support/ktrace.h
fs/xfs/xfs_alloc.c
fs/xfs/xfs_log.c
fs/xfs/xfs_mount.c
fs/xfs/xfs_mru_cache.c
fs/xfs/xfs_vfsops.c

diff --git a/fs/xfs/linux-2.6/spin.h b/fs/xfs/linux-2.6/spin.h
deleted file mode 100644 (file)
index aa23557..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-#ifndef __XFS_SUPPORT_SPIN_H__
-#define __XFS_SUPPORT_SPIN_H__
-
-#include <linux/sched.h>       /* preempt needs this */
-#include <linux/spinlock.h>
-
-#define spinlock_init(lock, name)      spin_lock_init(lock)
-#define        spinlock_destroy(lock)
-
-#endif /* __XFS_SUPPORT_SPIN_H__ */
index a49dd8d4b06974c9a9b8b20ca19bc0663dfe0471..522cfaa7025801818c3f1ec79137f1b48e96d99a 100644 (file)
@@ -1572,7 +1572,7 @@ xfs_alloc_delwrite_queue(
 
        INIT_LIST_HEAD(&btp->bt_list);
        INIT_LIST_HEAD(&btp->bt_delwrite_queue);
-       spinlock_init(&btp->bt_delwrite_lock, "delwri_lock");
+       spin_lock_init(&btp->bt_delwrite_lock);
        btp->bt_flags = 0;
        btp->bt_task = kthread_run(xfsbufd, btp, "xfsbufd");
        if (IS_ERR(btp->bt_task)) {
index dc3752de22da198a9a39c603f1e26eab23053588..ec51ecd1387785acd245ad3825d201ec2c729af7 100644 (file)
@@ -43,7 +43,6 @@
 
 #include <kmem.h>
 #include <mrlock.h>
-#include <spin.h>
 #include <sv.h>
 #include <mutex.h>
 #include <sema.h>
@@ -75,6 +74,7 @@
 #include <linux/notifier.h>
 #include <linux/delay.h>
 #include <linux/log2.h>
+#include <linux/spinlock.h>
 
 #include <asm/page.h>
 #include <asm/div64.h>
 #define current_restore_flags_nested(sp, f)    \
                (current->flags = ((current->flags & ~(f)) | (*(sp) & (f))))
 
+#define spinlock_destroy(lock)
+
 #define NBPP           PAGE_SIZE
 #define NDPP           (1 << (PAGE_SHIFT - 9))
 
index 08b44758035ecbccb63266bd0eb19a87686d8d41..35582fe9d648d9652fbaaf03f2cde3fa45440efd 100644 (file)
@@ -1138,7 +1138,7 @@ xfs_qm_init_quotainfo(
                return error;
        }
 
-       spinlock_init(&qinf->qi_pinlock, "xfs_qinf_pin");
+       spin_lock_init(&qinf->qi_pinlock);
        xfs_qm_list_init(&qinf->qi_dqlist, "mpdqlist", 0);
        qinf->qi_dqreclaims = 0;
 
index f45a49ffd3a34907f6b1ca2aceaea7dce40e2133..fa4fb1820e75a368c8d4e45d461e4a450b50c754 100644 (file)
@@ -17,7 +17,6 @@
  */
 #include <xfs.h>
 #include "debug.h"
-#include "spin.h"
 
 static char            message[1024];  /* keep it off the stack */
 static DEFINE_SPINLOCK(xfs_err_lock);
index 1e6d4a38ba28fd41fd8f904b3dda8ccb55ff8ead..56e72b40a859a42471fc685ad84bb164bed78f56 100644 (file)
@@ -18,8 +18,6 @@
 #ifndef __XFS_SUPPORT_KTRACE_H__
 #define __XFS_SUPPORT_KTRACE_H__
 
-#include <spin.h>
-
 /*
  * Trace buffer entry structure.
  */
index c23fb2aaa339ac7234a08990b5bbf10419b6b339..ea6aa60ace06b243c18a508afe718b07dbe58e58 100644 (file)
@@ -2206,7 +2206,7 @@ xfs_alloc_read_agf(
                        be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNOi]);
                pag->pagf_levels[XFS_BTNUM_CNTi] =
                        be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNTi]);
-               spinlock_init(&pag->pagb_lock, "xfspagb");
+               spin_lock_init(&pag->pagb_lock);
                pag->pagb_list = kmem_zalloc(XFS_PAGB_NUM_SLOTS *
                                        sizeof(xfs_perag_busy_t), KM_SLEEP);
                pag->pagf_init = 1;
index f1f1f36876e4178895ce98663ad4675639f52e6e..615638201284d3a246e81d459aabed834ca06920 100644 (file)
@@ -1189,8 +1189,8 @@ xlog_alloc_log(xfs_mount_t        *mp,
        ASSERT(XFS_BUF_VALUSEMA(bp) <= 0);
        log->l_xbuf = bp;
 
-       spinlock_init(&log->l_icloglock, "iclog");
-       spinlock_init(&log->l_grant_lock, "grhead_iclog");
+       spin_lock_init(&log->l_icloglock);
+       spin_lock_init(&log->l_grant_lock);
        initnsema(&log->l_flushsema, 0, "ic-flush");
        xlog_state_ticket_alloc(log);  /* wait until after icloglock inited */
 
index 6bc92c85733f8433c948da69dbbf34fe7a636650..6115f371663de9292f4a8bfc33366aafec4b7a70 100644 (file)
@@ -136,8 +136,8 @@ xfs_mount_init(void)
                mp->m_flags |= XFS_MOUNT_NO_PERCPU_SB;
        }
 
-       spinlock_init(&mp->m_ail_lock, "xfs_ail");
-       spinlock_init(&mp->m_sb_lock, "xfs_sb");
+       spin_lock_init(&mp->m_ail_lock);
+       spin_lock_init(&mp->m_sb_lock);
        mutex_init(&mp->m_ilock);
        mutex_init(&mp->m_growlock);
        /*
@@ -616,7 +616,7 @@ xfs_mount_common(xfs_mount_t *mp, xfs_sb_t *sbp)
        int     i;
 
        mp->m_agfrotor = mp->m_agirotor = 0;
-       spinlock_init(&mp->m_agirotor_lock, "m_agirotor_lock");
+       spin_lock_init(&mp->m_agirotor_lock);
        mp->m_maxagi = mp->m_sb.sb_agcount;
        mp->m_blkbit_log = sbp->sb_blocklog + XFS_NBBYLOG;
        mp->m_blkbb_log = sbp->sb_blocklog - BBSHIFT;
@@ -1916,7 +1916,6 @@ xfs_icsb_cpu_notify(
 {
        xfs_icsb_cnts_t *cntp;
        xfs_mount_t     *mp;
-       int             s;
 
        mp = (xfs_mount_t *)container_of(nfb, xfs_mount_t, m_icsb_notifier);
        cntp = (xfs_icsb_cnts_t *)
@@ -2190,7 +2189,6 @@ xfs_icsb_sync_counters_flags(
        int             flags)
 {
        xfs_icsb_cnts_t cnt;
-       int             s;
 
        /* Pass 1: lock all counters */
        if ((flags & XFS_ICSB_SB_LOCKED) == 0)
@@ -2248,7 +2246,6 @@ xfs_icsb_balance_counter(
 {
        uint64_t        count, resid;
        int             weight = num_online_cpus();
-       int             s;
        uint64_t        min = (uint64_t)min_per_cpu;
 
        if (!(flags & XFS_ICSB_SB_LOCKED))
@@ -2298,7 +2295,7 @@ xfs_icsb_modify_counters(
 {
        xfs_icsb_cnts_t *icsbp;
        long long       lcounter;       /* long counter for 64 bit fields */
-       int             cpu, ret = 0, s;
+       int             cpu, ret = 0;
 
        might_sleep();
 again:
index dc64630e870ea324bf28dab9dcebd20500bb20b8..012209eda35d847a61b1f13b7c7caa579455956d 100644 (file)
@@ -368,7 +368,7 @@ xfs_mru_cache_create(
         */
        INIT_RADIX_TREE(&mru->store, GFP_ATOMIC);
        INIT_LIST_HEAD(&mru->reap_list);
-       spinlock_init(&mru->lock, "xfs_mru_cache");
+       spin_lock_init(&mru->lock);
        INIT_DELAYED_WORK(&mru->work, _xfs_mru_cache_reap);
 
        mru->grp_time  = grp_time;
index 44f0216c03e9536f62045dc190929b359dd0e4d9..f5844678d45e1724b6e5abb88dd11aefad0892d9 100644 (file)
@@ -68,7 +68,7 @@ xfs_init(void)
        extern kmem_zone_t      *xfs_dabuf_zone;
 #ifdef XFS_DABUF_DEBUG
        extern spinlock_t        xfs_dabuf_global_lock;
-       spinlock_init(&xfs_dabuf_global_lock, "xfsda");
+       spin_lock_init(&xfs_dabuf_global_lock);
 #endif
 
        /*