summaryrefslogtreecommitdiff
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-30 08:54:29 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-30 08:54:29 -0800
commitc01a25e7cf6dcb0fa69c155706d5dd1e76e53796 (patch)
tree3db1252892b9ec594b813b5996b2041df8e47dd3 /fs/ext4/ext4.h
parentae704e9f92f87b12c5938b07245792857c7c9c14 (diff)
parentb9ec63f78b425c0e16cc95605b5d4ff2dc228b97 (diff)
downloadlinux-3.10-c01a25e7cf6dcb0fa69c155706d5dd1e76e53796.tar.gz
linux-3.10-c01a25e7cf6dcb0fa69c155706d5dd1e76e53796.tar.bz2
linux-3.10-c01a25e7cf6dcb0fa69c155706d5dd1e76e53796.zip
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: Remove bogus BUG() check in ext4_bmap() ext4: Fix building with EXT4FS_DEBUG ext4: Initialize the new group descriptor when resizing the filesystem ext4: Fix ext4_free_blocks() w/o a journal when files have indirect blocks jbd2: On a __journal_expect() assertion failure printk "JBD2", not "EXT3-fs" ext3: Add sanity check to make_indexed_dir ext4: Add sanity check to make_indexed_dir ext4: only use i_size_high for regular files ext4: fix wrong use of do_div
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index c668e4377d7..aafc9eba1c2 100644
--- a/fs/ext4/ext4.h
+++ b/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)