diff options
Diffstat (limited to 'fs/ubifs/debug.h')
-rw-r--r-- | fs/ubifs/debug.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h index 981a3fa081f3..64c6977c189b 100644 --- a/fs/ubifs/debug.h +++ b/fs/ubifs/debug.h @@ -148,18 +148,20 @@ struct ubifs_global_debug_info { unsigned int tst_rcvry:1; }; +void ubifs_assert_failed(struct ubifs_info *c, const char *expr, + const char *file, int line); + #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); \ - dump_stack(); \ + ubifs_assert_failed((struct ubifs_info *)c, #expr, __FILE__, \ + __LINE__); \ } \ } while (0) #define ubifs_assert_cmt_locked(c) do { \ if (unlikely(down_write_trylock(&(c)->commit_sem))) { \ up_write(&(c)->commit_sem); \ - pr_crit("commit lock is not locked!\n"); \ + ubifs_err(c, "commit lock is not locked!\n"); \ ubifs_assert(c, 0); \ } \ } while (0) |