diff options
Diffstat (limited to 'fs/xfs/xfs_error.c')
-rw-r--r-- | fs/xfs/xfs_error.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c index 05e5365d3c3..f66756cfb5e 100644 --- a/fs/xfs/xfs_error.c +++ b/fs/xfs/xfs_error.c | |||
@@ -66,14 +66,6 @@ int xfs_etest[XFS_NUM_INJECT_ERROR]; | |||
66 | int64_t xfs_etest_fsid[XFS_NUM_INJECT_ERROR]; | 66 | int64_t xfs_etest_fsid[XFS_NUM_INJECT_ERROR]; |
67 | char * xfs_etest_fsname[XFS_NUM_INJECT_ERROR]; | 67 | char * xfs_etest_fsname[XFS_NUM_INJECT_ERROR]; |
68 | 68 | ||
69 | void | ||
70 | xfs_error_test_init(void) | ||
71 | { | ||
72 | memset(xfs_etest, 0, sizeof(xfs_etest)); | ||
73 | memset(xfs_etest_fsid, 0, sizeof(xfs_etest_fsid)); | ||
74 | memset(xfs_etest_fsname, 0, sizeof(xfs_etest_fsname)); | ||
75 | } | ||
76 | |||
77 | int | 69 | int |
78 | xfs_error_test(int error_tag, int *fsidp, char *expression, | 70 | xfs_error_test(int error_tag, int *fsidp, char *expression, |
79 | int line, char *file, unsigned long randfactor) | 71 | int line, char *file, unsigned long randfactor) |
@@ -150,8 +142,7 @@ xfs_errortag_clearall(xfs_mount_t *mp, int loud) | |||
150 | xfs_etest[i]); | 142 | xfs_etest[i]); |
151 | xfs_etest[i] = 0; | 143 | xfs_etest[i] = 0; |
152 | xfs_etest_fsid[i] = 0LL; | 144 | xfs_etest_fsid[i] = 0LL; |
153 | kmem_free(xfs_etest_fsname[i], | 145 | kmem_free(xfs_etest_fsname[i]); |
154 | strlen(xfs_etest_fsname[i]) + 1); | ||
155 | xfs_etest_fsname[i] = NULL; | 146 | xfs_etest_fsname[i] = NULL; |
156 | } | 147 | } |
157 | } | 148 | } |
@@ -175,7 +166,7 @@ xfs_fs_vcmn_err(int level, xfs_mount_t *mp, char *fmt, va_list ap) | |||
175 | newfmt = kmem_alloc(len, KM_SLEEP); | 166 | newfmt = kmem_alloc(len, KM_SLEEP); |
176 | sprintf(newfmt, "Filesystem \"%s\": %s", mp->m_fsname, fmt); | 167 | sprintf(newfmt, "Filesystem \"%s\": %s", mp->m_fsname, fmt); |
177 | icmn_err(level, newfmt, ap); | 168 | icmn_err(level, newfmt, ap); |
178 | kmem_free(newfmt, len); | 169 | kmem_free(newfmt); |
179 | } else { | 170 | } else { |
180 | icmn_err(level, fmt, ap); | 171 | icmn_err(level, fmt, ap); |
181 | } | 172 | } |