diff options
Diffstat (limited to 'fs/ext3/inode.c')
-rw-r--r-- | fs/ext3/inode.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index a6cb6171c3af..de4e3161e479 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c | |||
@@ -2677,8 +2677,10 @@ void ext3_read_inode(struct inode * inode) | |||
2677 | */ | 2677 | */ |
2678 | ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize); | 2678 | ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize); |
2679 | if (EXT3_GOOD_OLD_INODE_SIZE + ei->i_extra_isize > | 2679 | if (EXT3_GOOD_OLD_INODE_SIZE + ei->i_extra_isize > |
2680 | EXT3_INODE_SIZE(inode->i_sb)) | 2680 | EXT3_INODE_SIZE(inode->i_sb)) { |
2681 | brelse (bh); | ||
2681 | goto bad_inode; | 2682 | goto bad_inode; |
2683 | } | ||
2682 | if (ei->i_extra_isize == 0) { | 2684 | if (ei->i_extra_isize == 0) { |
2683 | /* The extra space is currently unused. Use it. */ | 2685 | /* The extra space is currently unused. Use it. */ |
2684 | ei->i_extra_isize = sizeof(struct ext3_inode) - | 2686 | ei->i_extra_isize = sizeof(struct ext3_inode) - |
@@ -3193,7 +3195,7 @@ int ext3_change_inode_journal_flag(struct inode *inode, int val) | |||
3193 | */ | 3195 | */ |
3194 | 3196 | ||
3195 | journal = EXT3_JOURNAL(inode); | 3197 | journal = EXT3_JOURNAL(inode); |
3196 | if (is_journal_aborted(journal) || IS_RDONLY(inode)) | 3198 | if (is_journal_aborted(journal)) |
3197 | return -EROFS; | 3199 | return -EROFS; |
3198 | 3200 | ||
3199 | journal_lock_updates(journal); | 3201 | journal_lock_updates(journal); |