Commit 97bd42b9 authored by Josef Bacik's avatar Josef Bacik Committed by Theodore Ts'o

ext4: check return of ext4_orphan_get properly

This patch fix a panic while running fsfuzzer. 
We are improperly checking the return of ext4_orphan_get.
Signed-off-by: default avatarJosef Bacik <jbacik@redhat.com>
Signed-off-by: default avatarMingming Cao <cmm@us.ibm.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 1dfc3220
...@@ -1594,8 +1594,8 @@ static void ext4_orphan_cleanup (struct super_block * sb, ...@@ -1594,8 +1594,8 @@ static void ext4_orphan_cleanup (struct super_block * sb,
while (es->s_last_orphan) { while (es->s_last_orphan) {
struct inode *inode; struct inode *inode;
if (!(inode = inode = ext4_orphan_get(sb, le32_to_cpu(es->s_last_orphan));
ext4_orphan_get(sb, le32_to_cpu(es->s_last_orphan)))) { if (IS_ERR(inode)) {
es->s_last_orphan = 0; es->s_last_orphan = 0;
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment