]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_error.c
Staging: only build the tree if we really want to
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_error.c
index 05e5365d3c3170bd034c16e1cd79761e5dcf7bcf..f227ecd1a2942714e1d062c142c27f14781613a1 100644 (file)
@@ -58,22 +58,11 @@ xfs_error_trap(int e)
        }
        return e;
 }
-#endif
-
-#if (defined(DEBUG) || defined(INDUCE_IO_ERROR))
 
 int    xfs_etest[XFS_NUM_INJECT_ERROR];
 int64_t        xfs_etest_fsid[XFS_NUM_INJECT_ERROR];
 char * xfs_etest_fsname[XFS_NUM_INJECT_ERROR];
 
-void
-xfs_error_test_init(void)
-{
-       memset(xfs_etest, 0, sizeof(xfs_etest));
-       memset(xfs_etest_fsid, 0, sizeof(xfs_etest_fsid));
-       memset(xfs_etest_fsname, 0, sizeof(xfs_etest_fsname));
-}
-
 int
 xfs_error_test(int error_tag, int *fsidp, char *expression,
               int line, char *file, unsigned long randfactor)
@@ -150,8 +139,7 @@ xfs_errortag_clearall(xfs_mount_t *mp, int loud)
                                xfs_etest[i]);
                        xfs_etest[i] = 0;
                        xfs_etest_fsid[i] = 0LL;
-                       kmem_free(xfs_etest_fsname[i],
-                                 strlen(xfs_etest_fsname[i]) + 1);
+                       kmem_free(xfs_etest_fsname[i]);
                        xfs_etest_fsname[i] = NULL;
                }
        }
@@ -163,7 +151,7 @@ xfs_errortag_clearall(xfs_mount_t *mp, int loud)
 
        return 0;
 }
-#endif /* DEBUG || INDUCE_IO_ERROR */
+#endif /* DEBUG */
 
 static void
 xfs_fs_vcmn_err(int level, xfs_mount_t *mp, char *fmt, va_list ap)
@@ -175,7 +163,7 @@ xfs_fs_vcmn_err(int level, xfs_mount_t *mp, char *fmt, va_list ap)
                newfmt = kmem_alloc(len, KM_SLEEP);
                sprintf(newfmt, "Filesystem \"%s\": %s", mp->m_fsname, fmt);
                icmn_err(level, newfmt, ap);
-               kmem_free(newfmt, len);
+               kmem_free(newfmt);
        } else {
                icmn_err(level, fmt, ap);
        }