From 5be7361b27e5f14fcdf9ba1a5f4144d49e10aa9e Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sat, 17 Jan 2009 18:41:37 -0500 Subject: [PATCH] --- yaml --- r: 130522 b: refs/heads/master c: 06a279d636734da32bb62dd2f7b0ade666f65d7c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ext4/ext4.h | 7 +++++-- trunk/fs/ext4/inode.c | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index a603b650c2c2..7999c899cd96 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c225aa57ff4ffe715df4692676b77c815a337236 +refs/heads/master: 06a279d636734da32bb62dd2f7b0ade666f65d7c diff --git a/trunk/fs/ext4/ext4.h b/trunk/fs/ext4/ext4.h index c668e4377d76..aafc9eba1c25 100644 --- a/trunk/fs/ext4/ext4.h +++ b/trunk/fs/ext4/ext4.h @@ -1206,8 +1206,11 @@ static inline void ext4_r_blocks_count_set(struct ext4_super_block *es, static inline loff_t ext4_isize(struct ext4_inode *raw_inode) { - return ((loff_t)le32_to_cpu(raw_inode->i_size_high) << 32) | - le32_to_cpu(raw_inode->i_size_lo); + if (S_ISREG(le16_to_cpu(raw_inode->i_mode))) + return ((loff_t)le32_to_cpu(raw_inode->i_size_high) << 32) | + le32_to_cpu(raw_inode->i_size_lo); + else + return (loff_t) le32_to_cpu(raw_inode->i_size_lo); } static inline void ext4_isize_set(struct ext4_inode *raw_inode, loff_t i_size) diff --git a/trunk/fs/ext4/inode.c b/trunk/fs/ext4/inode.c index a6444cee0c7e..49484ba801c9 100644 --- a/trunk/fs/ext4/inode.c +++ b/trunk/fs/ext4/inode.c @@ -360,9 +360,9 @@ static int ext4_block_to_path(struct inode *inode, final = ptrs; } else { ext4_warning(inode->i_sb, "ext4_block_to_path", - "block %lu > max", + "block %lu > max in inode %lu", i_block + direct_blocks + - indirect_blocks + double_blocks); + indirect_blocks + double_blocks, inode->i_ino); } if (boundary) *boundary = final - 1 - (i_block & (ptrs - 1));