diff options
author | Theodore Ts'o <tytso@mit.edu> | 2009-11-15 15:29:56 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-14 09:45:01 -0800 |
commit | 31299e22be94e77b6df41d022e8f0bd075537d58 (patch) | |
tree | 7b11481d5f47ec88b7d4e48b4b8769a7d3900a06 /fs/ext4/inode.c | |
parent | 58ffefbe7bf2bdfc6f91b79eef9d670df6eab4d3 (diff) |
ext4: fix block validity checks so they work correctly with meta_bg
(cherry picked from commit 1032988c71f3f85483b2b4319684d1205a704c02)
The block validity checks used by ext4_data_block_valid() wasn't
correctly written to check file systems with the meta_bg feature. Fix
this.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 1842a72b72b1..68c9055a4d91 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4883,10 +4883,7 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino) ret = 0; if (ei->i_file_acl && - ((ei->i_file_acl < - (le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block) + - EXT4_SB(sb)->s_gdb_count)) || - (ei->i_file_acl >= ext4_blocks_count(EXT4_SB(sb)->s_es)))) { + !ext4_data_block_valid(EXT4_SB(sb), ei->i_file_acl, 1)) { ext4_error(sb, __func__, "bad extended attribute block %llu in inode #%lu", ei->i_file_acl, inode->i_ino); |