diff options
author | Richard Weinberger <richard@nod.at> | 2018-07-12 07:01:57 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2018-08-14 18:25:21 -0400 |
commit | 6eb61d587f4515e4be5669eff383c0185009954f (patch) | |
tree | a5d3183e104338319152a888e0ff980c2546e6e1 /fs/ubifs/debug.h | |
parent | 54169ddd382d461f7c01cc5a5182a4b4bc539489 (diff) |
ubifs: Pass struct ubifs_info to ubifs_assert()
This allows us to have more context in ubifs_assert()
and take different actions depending on the configuration.
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs/debug.h')
-rw-r--r-- | fs/ubifs/debug.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h index e03d5179769a..981a3fa081f3 100644 --- a/fs/ubifs/debug.h +++ b/fs/ubifs/debug.h | |||
@@ -148,7 +148,7 @@ struct ubifs_global_debug_info { | |||
148 | unsigned int tst_rcvry:1; | 148 | unsigned int tst_rcvry:1; |
149 | }; | 149 | }; |
150 | 150 | ||
151 | #define ubifs_assert(expr) do { \ | 151 | #define ubifs_assert(c, expr) do { \ |
152 | if (unlikely(!(expr))) { \ | 152 | if (unlikely(!(expr))) { \ |
153 | pr_crit("UBIFS assert failed in %s at %u (pid %d)\n", \ | 153 | pr_crit("UBIFS assert failed in %s at %u (pid %d)\n", \ |
154 | __func__, __LINE__, current->pid); \ | 154 | __func__, __LINE__, current->pid); \ |
@@ -160,7 +160,7 @@ struct ubifs_global_debug_info { | |||
160 | if (unlikely(down_write_trylock(&(c)->commit_sem))) { \ | 160 | if (unlikely(down_write_trylock(&(c)->commit_sem))) { \ |
161 | up_write(&(c)->commit_sem); \ | 161 | up_write(&(c)->commit_sem); \ |
162 | pr_crit("commit lock is not locked!\n"); \ | 162 | pr_crit("commit lock is not locked!\n"); \ |
163 | ubifs_assert(0); \ | 163 | ubifs_assert(c, 0); \ |
164 | } \ | 164 | } \ |
165 | } while (0) | 165 | } while (0) |
166 | 166 | ||