summaryrefslogtreecommitdiffstats
path: root/fs/ext4/dir.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2010-05-16 21:00:00 -0400
committerTheodore Ts'o <tytso@mit.edu>2010-05-16 21:00:00 -0400
commit24676da469f50f433baa347845639662c561d1f6 (patch)
treeb4b8205f8b50376af286193d0dcbe76f2bc2d1e1 /fs/ext4/dir.c
parent2ed886852adfcb070bf350e66a0da0d98b2f3ab5 (diff)
downloadlinux-stable-24676da469f50f433baa347845639662c561d1f6.tar.gz
linux-stable-24676da469f50f433baa347845639662c561d1f6.tar.bz2
linux-stable-24676da469f50f433baa347845639662c561d1f6.zip
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>
Diffstat (limited to 'fs/ext4/dir.c')
-rw-r--r--fs/ext4/dir.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
index e3f2700b8be7..6a2b8bcff641 100644
--- a/fs/ext4/dir.c
+++ b/fs/ext4/dir.c
@@ -83,11 +83,10 @@ int ext4_check_dir_entry(const char *function, struct inode *dir,
error_msg = "inode out of bounds";
if (error_msg != NULL)
- __ext4_error(dir->i_sb, function,
- "bad entry in directory #%lu: %s - block=%llu"
+ ext4_error_inode(function, dir,
+ "bad entry in directory: %s - block=%llu"
"offset=%u(%u), inode=%u, rec_len=%d, name_len=%d",
- dir->i_ino, error_msg,
- (unsigned long long) bh->b_blocknr,
+ error_msg, (unsigned long long) bh->b_blocknr,
(unsigned) (offset%bh->b_size), offset,
le32_to_cpu(de->inode),
rlen, de->name_len);
@@ -152,9 +151,8 @@ static int ext4_readdir(struct file *filp,
*/
if (!bh) {
if (!dir_has_error) {
- ext4_error(sb, "directory #%lu "
+ EXT4_ERROR_INODE(inode, "directory "
"contains a hole at offset %Lu",
- inode->i_ino,
(unsigned long long) filp->f_pos);
dir_has_error = 1;
}