summaryrefslogtreecommitdiff
path: root/fs/xfs/linux-2.6/xfs_stats.c
diff options
context:
space:
mode:
authorLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-06-23 13:19:45 +1000
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-06-23 13:19:45 +1000
commite0fe783155e4f1c7106f3579c258b9f995330c19 (patch)
treecbc84a02fbb1593a19c7dc82daed29c616b51a37 /fs/xfs/linux-2.6/xfs_stats.c
parentf23276e148739305f48093e6892d88c7cd0c8670 (diff)
[XFS]
SGI-PV: 111111 SGI-Modid: xfs-linux-melb:xfs-kern:31210a 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.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_stats.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/fs/xfs/linux-2.6/xfs_stats.c b/fs/xfs/linux-2.6/xfs_stats.c
index e480b6102051..3d5b67c075c7 100644
--- a/fs/xfs/linux-2.6/xfs_stats.c
+++ b/fs/xfs/linux-2.6/xfs_stats.c
@@ -98,12 +98,21 @@ xfs_read_xfsstats(
return len;
}
-void
+int
xfs_init_procfs(void)
{
if (!proc_mkdir("fs/xfs", NULL))
- return;
- create_proc_read_entry("fs/xfs/stat", 0, NULL, xfs_read_xfsstats, NULL);
+ goto out;
+
+ if (!create_proc_read_entry("fs/xfs/stat", 0, NULL,
+ xfs_read_xfsstats, NULL))
+ goto out_remove_entry;
+ return 0;
+
+ out_remove_entry:
+ remove_proc_entry("fs/xfs", NULL);
+ out:
+ return -ENOMEM;
}
void