aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ubifs/debug.c')
-rw-r--r--fs/ubifs/debug.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index 1a626484f8ae..564e330d05b1 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
@@ -3081,6 +3081,28 @@ void dbg_debugfs_exit(void)
3081 debugfs_remove_recursive(dfs_rootdir); 3081 debugfs_remove_recursive(dfs_rootdir);
3082} 3082}
3083 3083
3084void ubifs_assert_failed(struct ubifs_info *c, const char *expr,
3085 const char *file, int line)
3086{
3087 ubifs_err(c, "UBIFS assert failed: %s, in %s:%u", expr, file, line);
3088
3089 switch (c->assert_action) {
3090 case ASSACT_PANIC:
3091 BUG();
3092 break;
3093
3094 case ASSACT_RO:
3095 ubifs_ro_mode(c, -EINVAL);
3096 break;
3097
3098 case ASSACT_REPORT:
3099 default:
3100 dump_stack();
3101 break;
3102
3103 }
3104}
3105
3084/** 3106/**
3085 * ubifs_debugging_init - initialize UBIFS debugging. 3107 * ubifs_debugging_init - initialize UBIFS debugging.
3086 * @c: UBIFS file-system description object 3108 * @c: UBIFS file-system description object