summaryrefslogtreecommitdiff
path: root/fs/ubifs/debug.h
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2018-07-12 14:01:57 +0300
committerRichard Weinberger <richard@nod.at>2018-08-15 01:25:21 +0300
commit6eb61d587f4515e4be5669eff383c0185009954f (patch)
treea5d3183e104338319152a888e0ff980c2546e6e1 /fs/ubifs/debug.h
parent54169ddd382d461f7c01cc5a5182a4b4bc539489 (diff)
downloadlinux-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.h4
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)