diff options
author | Richard Weinberger <richard@nod.at> | 2018-07-12 14:01:57 +0300 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2018-08-15 01:25:21 +0300 |
commit | 6eb61d587f4515e4be5669eff383c0185009954f (patch) | |
tree | a5d3183e104338319152a888e0ff980c2546e6e1 /fs/ubifs/debug.h | |
parent | 54169ddd382d461f7c01cc5a5182a4b4bc539489 (diff) | |
download | linux-6eb61d587f4515e4be5669eff383c0185009954f.tar.xz |
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 { unsigned int tst_rcvry:1; }; -#define ubifs_assert(expr) do { \ +#define ubifs_assert(c, expr) do { \ if (unlikely(!(expr))) { \ pr_crit("UBIFS assert failed in %s at %u (pid %d)\n", \ __func__, __LINE__, current->pid); \ @@ -160,7 +160,7 @@ struct ubifs_global_debug_info { if (unlikely(down_write_trylock(&(c)->commit_sem))) { \ up_write(&(c)->commit_sem); \ pr_crit("commit lock is not locked!\n"); \ - ubifs_assert(0); \ + ubifs_assert(c, 0); \ } \ } while (0) |