diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-05-20 01:10:52 -0400 |
---|---|---|
committer | Niv Sardi <xaiki@debian.org> | 2008-07-28 02:58:29 -0400 |
commit | c962fb7902669a48a2c613649c1f03865c0ffd1e (patch) | |
tree | 370bdf7273c92a2bcb230680c6b0bfa4928b11e8 /fs/xfs/xfs_mount.h | |
parent | bdd907bab78419f34113c51470192945741b839e (diff) |
[XFS] kill xfs_mount_init
xfs_mount_init is inlined into xfs_fs_fill_super and allocation switched
to kzalloc. Plug a leak of the mount structure for most early mount
failures. Move xfs_icsb_init_counters to as late as possible in the mount
path and make sure to undo it so that no stale hotplug cpu notifiers are
left around on mount failures.
SGI-PV: 981951
SGI-Modid: xfs-linux-melb:xfs-kern:31196a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_mount.h')
-rw-r--r-- | fs/xfs/xfs_mount.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index 5acde7fd9c0a..96d8791e9e5a 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h | |||
@@ -210,12 +210,14 @@ typedef struct xfs_icsb_cnts { | |||
210 | 210 | ||
211 | extern int xfs_icsb_init_counters(struct xfs_mount *); | 211 | extern int xfs_icsb_init_counters(struct xfs_mount *); |
212 | extern void xfs_icsb_reinit_counters(struct xfs_mount *); | 212 | extern void xfs_icsb_reinit_counters(struct xfs_mount *); |
213 | extern void xfs_icsb_destroy_counters(struct xfs_mount *); | ||
213 | extern void xfs_icsb_sync_counters(struct xfs_mount *, int); | 214 | extern void xfs_icsb_sync_counters(struct xfs_mount *, int); |
214 | extern void xfs_icsb_sync_counters_locked(struct xfs_mount *, int); | 215 | extern void xfs_icsb_sync_counters_locked(struct xfs_mount *, int); |
215 | 216 | ||
216 | #else | 217 | #else |
217 | #define xfs_icsb_init_counters(mp) (0) | 218 | #define xfs_icsb_init_counters(mp) (0) |
218 | #define xfs_icsb_reinit_counters(mp) do { } while (0) | 219 | #define xfs_icsb_destroy_counters(mp) do { } while (0) |
220 | #define xfs_icsb_reinit_counters(mp) do { } while (0) | ||
219 | #define xfs_icsb_sync_counters(mp, flags) do { } while (0) | 221 | #define xfs_icsb_sync_counters(mp, flags) do { } while (0) |
220 | #define xfs_icsb_sync_counters_locked(mp, flags) do { } while (0) | 222 | #define xfs_icsb_sync_counters_locked(mp, flags) do { } while (0) |
221 | #endif | 223 | #endif |
@@ -511,10 +513,8 @@ typedef struct xfs_mod_sb { | |||
511 | #define XFS_MOUNT_ILOCK(mp) mutex_lock(&((mp)->m_ilock)) | 513 | #define XFS_MOUNT_ILOCK(mp) mutex_lock(&((mp)->m_ilock)) |
512 | #define XFS_MOUNT_IUNLOCK(mp) mutex_unlock(&((mp)->m_ilock)) | 514 | #define XFS_MOUNT_IUNLOCK(mp) mutex_unlock(&((mp)->m_ilock)) |
513 | 515 | ||
514 | extern xfs_mount_t *xfs_mount_init(void); | ||
515 | extern void xfs_mod_sb(xfs_trans_t *, __int64_t); | 516 | extern void xfs_mod_sb(xfs_trans_t *, __int64_t); |
516 | extern int xfs_log_sbcount(xfs_mount_t *, uint); | 517 | extern int xfs_log_sbcount(xfs_mount_t *, uint); |
517 | extern void xfs_mount_free(xfs_mount_t *mp); | ||
518 | extern int xfs_mountfs(xfs_mount_t *mp, int); | 518 | extern int xfs_mountfs(xfs_mount_t *mp, int); |
519 | extern void xfs_mountfs_check_barriers(xfs_mount_t *mp); | 519 | extern void xfs_mountfs_check_barriers(xfs_mount_t *mp); |
520 | 520 | ||