summaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_stats.h
diff options
context:
space:
mode:
authorChristoph Hellwig2008-07-18 09:11:46 +0200
committerNiv Sardi2008-07-28 08:59:25 +0200
commit9f8868ffb39c2f80ba69df4552cb530b6634f646 (patch)
treefba09366faf55ee039cdbd91dff78b7d87a86d0b /fs/xfs/linux-2.6/xfs_stats.h
parent[XFS] Fix up problem when CONFIG_XFS_POSIX_ACL is not set and yet we still (diff)
downloadkernel-qcow2-linux-9f8868ffb39c2f80ba69df4552cb530b6634f646.tar.gz
kernel-qcow2-linux-9f8868ffb39c2f80ba69df4552cb530b6634f646.tar.xz
kernel-qcow2-linux-9f8868ffb39c2f80ba69df4552cb530b6634f646.zip
[XFS] streamline init/exit path
Currently the xfs module init/exit code is a mess. It's farmed out over a lot of function with very little error checking. This patch makes sure we propagate all initialization failures properly and clean up after them. Various runtime initializations are replaced with compile-time initializations where possible to make this easier. The exit path is similarly consolidated. There's now split out function to create/destroy the kmem zones and alloc/free the trace buffers. I've also changed the ktrace allocations to KM_MAYFAIL and handled errors resulting from that. And yes, we really should replace the XFS_*_TRACE ifdefs with a single XFS_TRACE.. SGI-PV: 976035 SGI-Modid: xfs-linux-melb:xfs-kern:31354a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Niv Sardi <xaiki@sgi.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_stats.h')
-rw-r--r--fs/xfs/linux-2.6/xfs_stats.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/xfs/linux-2.6/xfs_stats.h b/fs/xfs/linux-2.6/xfs_stats.h
index afd0b0d5fdb2..3fa753d7b700 100644
--- a/fs/xfs/linux-2.6/xfs_stats.h
+++ b/fs/xfs/linux-2.6/xfs_stats.h
@@ -134,7 +134,7 @@ DECLARE_PER_CPU(struct xfsstats, xfsstats);
#define XFS_STATS_DEC(v) (per_cpu(xfsstats, current_cpu()).v--)
#define XFS_STATS_ADD(v, inc) (per_cpu(xfsstats, current_cpu()).v += (inc))
-extern void xfs_init_procfs(void);
+extern int xfs_init_procfs(void);
extern void xfs_cleanup_procfs(void);
@@ -144,8 +144,13 @@ extern void xfs_cleanup_procfs(void);
# define XFS_STATS_DEC(count)
# define XFS_STATS_ADD(count, inc)
-static inline void xfs_init_procfs(void) { };
-static inline void xfs_cleanup_procfs(void) { };
+static inline int xfs_init_procfs(void)
+{
+ return 0
+};
+static inline void xfs_cleanup_procfs(void)
+{
+};
#endif /* !CONFIG_PROC_FS */