diff options
-rw-r--r-- | fs/xfs/xfs_error.c | 5 | ||||
-rw-r--r-- | fs/xfs/xfs_error.h | 12 | ||||
-rw-r--r-- | fs/xfs/xfs_mount.c | 2 |
3 files changed, 4 insertions, 15 deletions
diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c index f66756cfb5e8..f227ecd1a294 100644 --- a/fs/xfs/xfs_error.c +++ b/fs/xfs/xfs_error.c | |||
@@ -58,9 +58,6 @@ xfs_error_trap(int e) | |||
58 | } | 58 | } |
59 | return e; | 59 | return e; |
60 | } | 60 | } |
61 | #endif | ||
62 | |||
63 | #if (defined(DEBUG) || defined(INDUCE_IO_ERROR)) | ||
64 | 61 | ||
65 | int xfs_etest[XFS_NUM_INJECT_ERROR]; | 62 | int xfs_etest[XFS_NUM_INJECT_ERROR]; |
66 | int64_t xfs_etest_fsid[XFS_NUM_INJECT_ERROR]; | 63 | int64_t xfs_etest_fsid[XFS_NUM_INJECT_ERROR]; |
@@ -154,7 +151,7 @@ xfs_errortag_clearall(xfs_mount_t *mp, int loud) | |||
154 | 151 | ||
155 | return 0; | 152 | return 0; |
156 | } | 153 | } |
157 | #endif /* DEBUG || INDUCE_IO_ERROR */ | 154 | #endif /* DEBUG */ |
158 | 155 | ||
159 | static void | 156 | static void |
160 | xfs_fs_vcmn_err(int level, xfs_mount_t *mp, char *fmt, va_list ap) | 157 | xfs_fs_vcmn_err(int level, xfs_mount_t *mp, char *fmt, va_list ap) |
diff --git a/fs/xfs/xfs_error.h b/fs/xfs/xfs_error.h index d8559d132efa..11543f10b0c6 100644 --- a/fs/xfs/xfs_error.h +++ b/fs/xfs/xfs_error.h | |||
@@ -125,22 +125,14 @@ extern void xfs_corruption_error(char *tag, int level, struct xfs_mount *mp, | |||
125 | #define XFS_RANDOM_DIOWRITE_IOERR (XFS_RANDOM_DEFAULT/10) | 125 | #define XFS_RANDOM_DIOWRITE_IOERR (XFS_RANDOM_DEFAULT/10) |
126 | #define XFS_RANDOM_BMAPIFORMAT XFS_RANDOM_DEFAULT | 126 | #define XFS_RANDOM_BMAPIFORMAT XFS_RANDOM_DEFAULT |
127 | 127 | ||
128 | #if (defined(DEBUG) || defined(INDUCE_IO_ERROR)) | 128 | #ifdef DEBUG |
129 | extern int xfs_error_test(int, int *, char *, int, char *, unsigned long); | 129 | extern int xfs_error_test(int, int *, char *, int, char *, unsigned long); |
130 | 130 | ||
131 | #define XFS_NUM_INJECT_ERROR 10 | 131 | #define XFS_NUM_INJECT_ERROR 10 |
132 | |||
133 | #ifdef __ANSI_CPP__ | ||
134 | #define XFS_TEST_ERROR(expr, mp, tag, rf) \ | ||
135 | ((expr) || \ | ||
136 | xfs_error_test((tag), (mp)->m_fixedfsid, #expr, __LINE__, __FILE__, \ | ||
137 | (rf))) | ||
138 | #else | ||
139 | #define XFS_TEST_ERROR(expr, mp, tag, rf) \ | 132 | #define XFS_TEST_ERROR(expr, mp, tag, rf) \ |
140 | ((expr) || \ | 133 | ((expr) || \ |
141 | xfs_error_test((tag), (mp)->m_fixedfsid, "expr", __LINE__, __FILE__, \ | 134 | xfs_error_test((tag), (mp)->m_fixedfsid, "expr", __LINE__, __FILE__, \ |
142 | (rf))) | 135 | (rf))) |
143 | #endif /* __ANSI_CPP__ */ | ||
144 | 136 | ||
145 | extern int xfs_errortag_add(int error_tag, xfs_mount_t *mp); | 137 | extern int xfs_errortag_add(int error_tag, xfs_mount_t *mp); |
146 | extern int xfs_errortag_clearall(xfs_mount_t *mp, int loud); | 138 | extern int xfs_errortag_clearall(xfs_mount_t *mp, int loud); |
@@ -148,7 +140,7 @@ extern int xfs_errortag_clearall(xfs_mount_t *mp, int loud); | |||
148 | #define XFS_TEST_ERROR(expr, mp, tag, rf) (expr) | 140 | #define XFS_TEST_ERROR(expr, mp, tag, rf) (expr) |
149 | #define xfs_errortag_add(tag, mp) (ENOSYS) | 141 | #define xfs_errortag_add(tag, mp) (ENOSYS) |
150 | #define xfs_errortag_clearall(mp, loud) (ENOSYS) | 142 | #define xfs_errortag_clearall(mp, loud) (ENOSYS) |
151 | #endif /* (DEBUG || INDUCE_IO_ERROR) */ | 143 | #endif /* DEBUG */ |
152 | 144 | ||
153 | /* | 145 | /* |
154 | * XFS panic tags -- allow a call to xfs_cmn_err() be turned into | 146 | * XFS panic tags -- allow a call to xfs_cmn_err() be turned into |
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 31699b19bb3c..6b4350700c0d 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
@@ -1315,7 +1315,7 @@ xfs_unmountfs(xfs_mount_t *mp) | |||
1315 | if ((mp->m_flags & XFS_MOUNT_NOUUID) == 0) | 1315 | if ((mp->m_flags & XFS_MOUNT_NOUUID) == 0) |
1316 | uuid_table_remove(&mp->m_sb.sb_uuid); | 1316 | uuid_table_remove(&mp->m_sb.sb_uuid); |
1317 | 1317 | ||
1318 | #if defined(DEBUG) || defined(INDUCE_IO_ERROR) | 1318 | #if defined(DEBUG) |
1319 | xfs_errortag_clearall(mp, 0); | 1319 | xfs_errortag_clearall(mp, 0); |
1320 | #endif | 1320 | #endif |
1321 | xfs_mount_free(mp); | 1321 | xfs_mount_free(mp); |