]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/linux-2.6/xfs_stats.c
[XFS] streamline init/exit path
[linux-2.6-omap-h63xx.git] / fs / xfs / linux-2.6 / xfs_stats.c
index e480b610205198db045d49c623f39578eca1636a..3d5b67c075c7ab5b927884313f35196fd9249e80 100644 (file)
@@ -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