diff options
author | Frank Mayhar <fmayhar@google.com> | 2010-03-02 11:46:09 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2010-03-02 11:46:09 -0500 |
commit | 273df556b6ee2065bfe96edab5888d3dc9b108d8 (patch) | |
tree | 19c73685fce581e4ed85ff845e0b2fc485cedf9c /fs/ext4/ext4.h | |
parent | b7adc1f363e72e9131a582cc2cb00eaf83f51a39 (diff) | |
download | op-kernel-dev-273df556b6ee2065bfe96edab5888d3dc9b108d8.zip op-kernel-dev-273df556b6ee2065bfe96edab5888d3dc9b108d8.tar.gz |
ext4: Convert BUG_ON checks to use ext4_error() instead
Convert a bunch of BUG_ONs to emit a ext4_error() message and return
EIO. This is a first pass and most notably does _not_ cover
mballoc.c, which is a morass of void functions.
Signed-off-by: Frank Mayhar <fmayhar@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index dee4580..3d85bbb 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -53,6 +53,12 @@ #define ext4_debug(f, a...) do {} while (0) #endif +#define EXT4_ERROR_INODE(inode, fmt, a...) \ + ext4_error_inode(__func__, (inode), (fmt), ## a); + +#define EXT4_ERROR_FILE(file, fmt, a...) \ + ext4_error_file(__func__, (file), (fmt), ## a); + /* data type for block offset of block group */ typedef int ext4_grpblk_t; @@ -1492,6 +1498,10 @@ extern int ext4_group_extend(struct super_block *sb, extern void __ext4_error(struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); #define ext4_error(sb, message...) __ext4_error(sb, __func__, ## message) +extern void ext4_error_inode(const char *, struct inode *, const char *, ...) + __attribute__ ((format (printf, 3, 4))); +extern void ext4_error_file(const char *, struct file *, const char *, ...) + __attribute__ ((format (printf, 3, 4))); extern void __ext4_std_error(struct super_block *, const char *, int); extern void ext4_abort(struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); |