ext4: Convert calls of ext4_error() to EXT4_ERROR_INODE()

EXT4_ERROR_INODE() tends to provide better error information and in a
more consistent format.  Some errors were not even identifying the inode
or directory which was corrupted, which made them not very useful.

Addresses-Google-Bug: #2507977

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Šī revīzija ir iekļauta:
Theodore Ts'o
2010-05-16 21:00:00 -04:00
vecāks 2ed886852a
revīzija 24676da469
7 mainīti faili ar 86 papildinājumiem un 103 dzēšanām

Parādīt failu

@@ -439,10 +439,10 @@ static int __ext4_ext_check(const char *function, struct inode *inode,
return 0;
corrupted:
__ext4_error(inode->i_sb, function,
"bad header/extent in inode #%lu: %s - magic %x, "
ext4_error_inode(function, inode,
"bad header/extent: %s - magic %x, "
"entries %u, max %u(%u), depth %u(%u)",
inode->i_ino, error_msg, le16_to_cpu(eh->eh_magic),
error_msg, le16_to_cpu(eh->eh_magic),
le16_to_cpu(eh->eh_entries), le16_to_cpu(eh->eh_max),
max, le16_to_cpu(eh->eh_depth), depth);
@@ -1622,9 +1622,7 @@ int ext4_ext_try_to_merge(struct inode *inode,
merge_done = 1;
WARN_ON(eh->eh_entries == 0);
if (!eh->eh_entries)
ext4_error(inode->i_sb,
"inode#%lu, eh->eh_entries = 0!",
inode->i_ino);
EXT4_ERROR_INODE(inode, "eh->eh_entries = 0!");
}
return merge_done;