diff options
Diffstat (limited to 'fs/xfs/xfs_mount.c')
-rw-r--r-- | fs/xfs/xfs_mount.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index c67f8a9ae418..1bfaa204f689 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
@@ -51,7 +51,6 @@ STATIC void xfs_unmountfs_wait(xfs_mount_t *); | |||
51 | 51 | ||
52 | 52 | ||
53 | #ifdef HAVE_PERCPU_SB | 53 | #ifdef HAVE_PERCPU_SB |
54 | STATIC void xfs_icsb_destroy_counters(xfs_mount_t *); | ||
55 | STATIC void xfs_icsb_balance_counter(xfs_mount_t *, xfs_sb_field_t, | 54 | STATIC void xfs_icsb_balance_counter(xfs_mount_t *, xfs_sb_field_t, |
56 | int); | 55 | int); |
57 | STATIC void xfs_icsb_balance_counter_locked(xfs_mount_t *, xfs_sb_field_t, | 56 | STATIC void xfs_icsb_balance_counter_locked(xfs_mount_t *, xfs_sb_field_t, |
@@ -62,7 +61,6 @@ STATIC void xfs_icsb_disable_counter(xfs_mount_t *, xfs_sb_field_t); | |||
62 | 61 | ||
63 | #else | 62 | #else |
64 | 63 | ||
65 | #define xfs_icsb_destroy_counters(mp) do { } while (0) | ||
66 | #define xfs_icsb_balance_counter(mp, a, b) do { } while (0) | 64 | #define xfs_icsb_balance_counter(mp, a, b) do { } while (0) |
67 | #define xfs_icsb_balance_counter_locked(mp, a, b) do { } while (0) | 65 | #define xfs_icsb_balance_counter_locked(mp, a, b) do { } while (0) |
68 | #define xfs_icsb_modify_counters(mp, a, b, c) do { } while (0) | 66 | #define xfs_icsb_modify_counters(mp, a, b, c) do { } while (0) |
@@ -125,33 +123,11 @@ static const struct { | |||
125 | }; | 123 | }; |
126 | 124 | ||
127 | /* | 125 | /* |
128 | * Return a pointer to an initialized xfs_mount structure. | ||
129 | */ | ||
130 | xfs_mount_t * | ||
131 | xfs_mount_init(void) | ||
132 | { | ||
133 | xfs_mount_t *mp; | ||
134 | |||
135 | mp = kmem_zalloc(sizeof(xfs_mount_t), KM_SLEEP); | ||
136 | |||
137 | if (xfs_icsb_init_counters(mp)) { | ||
138 | mp->m_flags |= XFS_MOUNT_NO_PERCPU_SB; | ||
139 | } | ||
140 | |||
141 | spin_lock_init(&mp->m_sb_lock); | ||
142 | mutex_init(&mp->m_ilock); | ||
143 | mutex_init(&mp->m_growlock); | ||
144 | atomic_set(&mp->m_active_trans, 0); | ||
145 | |||
146 | return mp; | ||
147 | } | ||
148 | |||
149 | /* | ||
150 | * Free up the resources associated with a mount structure. Assume that | 126 | * Free up the resources associated with a mount structure. Assume that |
151 | * the structure was initially zeroed, so we can tell which fields got | 127 | * the structure was initially zeroed, so we can tell which fields got |
152 | * initialized. | 128 | * initialized. |
153 | */ | 129 | */ |
154 | void | 130 | STATIC void |
155 | xfs_mount_free( | 131 | xfs_mount_free( |
156 | xfs_mount_t *mp) | 132 | xfs_mount_t *mp) |
157 | { | 133 | { |
@@ -177,8 +153,6 @@ xfs_mount_free( | |||
177 | kmem_free(mp->m_rtname); | 153 | kmem_free(mp->m_rtname); |
178 | if (mp->m_logname != NULL) | 154 | if (mp->m_logname != NULL) |
179 | kmem_free(mp->m_logname); | 155 | kmem_free(mp->m_logname); |
180 | |||
181 | xfs_icsb_destroy_counters(mp); | ||
182 | } | 156 | } |
183 | 157 | ||
184 | /* | 158 | /* |
@@ -2093,7 +2067,7 @@ xfs_icsb_reinit_counters( | |||
2093 | xfs_icsb_unlock(mp); | 2067 | xfs_icsb_unlock(mp); |
2094 | } | 2068 | } |
2095 | 2069 | ||
2096 | STATIC void | 2070 | void |
2097 | xfs_icsb_destroy_counters( | 2071 | xfs_icsb_destroy_counters( |
2098 | xfs_mount_t *mp) | 2072 | xfs_mount_t *mp) |
2099 | { | 2073 | { |