diff options
-rw-r--r-- | fs/reiserfs/prints.c | 25 | ||||
-rw-r--r-- | include/linux/reiserfs_fs.h | 4 |
2 files changed, 29 insertions, 0 deletions
diff --git a/fs/reiserfs/prints.c b/fs/reiserfs/prints.c index 84f3f69652e3..8e826c07cd21 100644 --- a/fs/reiserfs/prints.c +++ b/fs/reiserfs/prints.c | |||
@@ -370,6 +370,31 @@ void __reiserfs_panic(struct super_block *sb, const char *id, | |||
370 | id ? id : "", id ? " " : "", function, error_buf); | 370 | id ? id : "", id ? " " : "", function, error_buf); |
371 | } | 371 | } |
372 | 372 | ||
373 | void __reiserfs_error(struct super_block *sb, const char *id, | ||
374 | const char *function, const char *fmt, ...) | ||
375 | { | ||
376 | do_reiserfs_warning(fmt); | ||
377 | |||
378 | BUG_ON(sb == NULL); | ||
379 | |||
380 | if (reiserfs_error_panic(sb)) | ||
381 | __reiserfs_panic(sb, id, function, error_buf); | ||
382 | |||
383 | if (id && id[0]) | ||
384 | printk(KERN_CRIT "REISERFS error (device %s): %s %s: %s\n", | ||
385 | sb->s_id, id, function, error_buf); | ||
386 | else | ||
387 | printk(KERN_CRIT "REISERFS error (device %s): %s: %s\n", | ||
388 | sb->s_id, function, error_buf); | ||
389 | |||
390 | if (sb->s_flags & MS_RDONLY) | ||
391 | return; | ||
392 | |||
393 | reiserfs_info(sb, "Remounting filesystem read-only\n"); | ||
394 | sb->s_flags |= MS_RDONLY; | ||
395 | reiserfs_abort_journal(sb, -EIO); | ||
396 | } | ||
397 | |||
373 | void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...) | 398 | void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...) |
374 | { | 399 | { |
375 | do_reiserfs_warning(fmt); | 400 | do_reiserfs_warning(fmt); |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index d097966bbd91..6c4af98b6767 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -2006,6 +2006,10 @@ void __reiserfs_panic(struct super_block *s, const char *id, | |||
2006 | __attribute__ ((noreturn)); | 2006 | __attribute__ ((noreturn)); |
2007 | #define reiserfs_panic(s, id, fmt, args...) \ | 2007 | #define reiserfs_panic(s, id, fmt, args...) \ |
2008 | __reiserfs_panic(s, id, __func__, fmt, ##args) | 2008 | __reiserfs_panic(s, id, __func__, fmt, ##args) |
2009 | void __reiserfs_error(struct super_block *s, const char *id, | ||
2010 | const char *function, const char *fmt, ...); | ||
2011 | #define reiserfs_error(s, id, fmt, args...) \ | ||
2012 | __reiserfs_error(s, id, __func__, fmt, ##args) | ||
2009 | void reiserfs_info(struct super_block *s, const char *fmt, ...); | 2013 | void reiserfs_info(struct super_block *s, const char *fmt, ...); |
2010 | void reiserfs_debug(struct super_block *s, int level, const char *fmt, ...); | 2014 | void reiserfs_debug(struct super_block *s, int level, const char *fmt, ...); |
2011 | void print_indirect_item(struct buffer_head *bh, int item_num); | 2015 | void print_indirect_item(struct buffer_head *bh, int item_num); |