summaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-31 14:27:28 +0100
committerIngo Molnar <mingo@elte.hu>2009-01-31 14:27:28 +0100
commit9f84653bbfba4f6c1bc7c0de914319bad55f17a4 (patch)
tree0455f3e221d6128ba1efb68135c3fbe2c2c8b390 /fs/ext4/ext4.h
parent3ac6cffea4aa18007a454a7442da2855882f403d (diff)
parentda2c0b021cde94866f1e492f940aad29e8f61258 (diff)
downloadblackbird-op-linux-9f84653bbfba4f6c1bc7c0de914319bad55f17a4.tar.gz
blackbird-op-linux-9f84653bbfba4f6c1bc7c0de914319bad55f17a4.zip
Merge branch 'tj-percpu' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc into core/percpu
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 c668e4377d76..aafc9eba1c25 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)
OpenPOWER on IntegriCloud