Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174367
b: refs/heads/master
c: 567f3e9
h: refs/heads/master
i:
  174365: 85b396c
  174363: d491d90
  174359: 76bfada
  174351: 962fa87
  174335: 5270c65
v: v3
  • Loading branch information
Theodore Ts'o committed Nov 14, 2009
1 parent 846dda5 commit 4b6b959
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 92c28159dce22913aef6aa811ce6fb0f7f3790b1
refs/heads/master: 567f3e9a70d71e5c9be03701b8578be77857293b
11 changes: 3 additions & 8 deletions trunk/fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -4781,7 +4781,6 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
struct ext4_iloc iloc;
struct ext4_inode *raw_inode;
struct ext4_inode_info *ei;
struct buffer_head *bh;
struct inode *inode;
long ret;
int block;
Expand All @@ -4793,11 +4792,11 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
return inode;

ei = EXT4_I(inode);
iloc.bh = 0;

ret = __ext4_get_inode_loc(inode, &iloc, 0);
if (ret < 0)
goto bad_inode;
bh = iloc.bh;
raw_inode = ext4_raw_inode(&iloc);
inode->i_mode = le16_to_cpu(raw_inode->i_mode);
inode->i_uid = (uid_t)le16_to_cpu(raw_inode->i_uid_low);
Expand All @@ -4820,7 +4819,6 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
if (inode->i_mode == 0 ||
!(EXT4_SB(inode->i_sb)->s_mount_state & EXT4_ORPHAN_FS)) {
/* this inode is deleted */
brelse(bh);
ret = -ESTALE;
goto bad_inode;
}
Expand Down Expand Up @@ -4852,7 +4850,6 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize);
if (EXT4_GOOD_OLD_INODE_SIZE + ei->i_extra_isize >
EXT4_INODE_SIZE(inode->i_sb)) {
brelse(bh);
ret = -EIO;
goto bad_inode;
}
Expand Down Expand Up @@ -4905,10 +4902,8 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
/* Validate block references which are part of inode */
ret = ext4_check_inode_blockref(inode);
}
if (ret) {
brelse(bh);
if (ret)
goto bad_inode;
}

if (S_ISREG(inode->i_mode)) {
inode->i_op = &ext4_file_inode_operations;
Expand Down Expand Up @@ -4936,7 +4931,6 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
init_special_inode(inode, inode->i_mode,
new_decode_dev(le32_to_cpu(raw_inode->i_block[1])));
} else {
brelse(bh);
ret = -EIO;
ext4_error(inode->i_sb, __func__,
"bogus i_mode (%o) for inode=%lu",
Expand All @@ -4949,6 +4943,7 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
return inode;

bad_inode:
brelse(iloc.bh);
iget_failed(inode);
return ERR_PTR(ret);
}
Expand Down

0 comments on commit 4b6b959

Please sign in to comment.