Skip to content

Commit

Permalink
ext4: check return of ext4_orphan_get properly
Browse files Browse the repository at this point in the history
This patch fix a panic while running fsfuzzer. 
We are improperly checking the return of ext4_orphan_get.

Signed-off-by: Josef Bacik <jbacik@redhat.com>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Josef Bacik authored and Theodore Ts'o committed Apr 30, 2008
1 parent 1dfc322 commit 97bd42b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1594,8 +1594,8 @@ static void ext4_orphan_cleanup (struct super_block * sb,
while (es->s_last_orphan) {
struct inode *inode;

if (!(inode =
ext4_orphan_get(sb, le32_to_cpu(es->s_last_orphan)))) {
inode = ext4_orphan_get(sb, le32_to_cpu(es->s_last_orphan));
if (IS_ERR(inode)) {
es->s_last_orphan = 0;
break;
}
Expand Down

0 comments on commit 97bd42b

Please sign in to comment.