diff options
author | Josef Bacik <jbacik@redhat.com> | 2008-04-29 22:04:56 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-04-29 22:04:56 -0400 |
commit | 97bd42b9c8be748ad85b362ba3bd401f4d35be80 (patch) | |
tree | 161f8972e7e94e3c1a384e22fc4be55fe9c18c55 | |
parent | 1dfc3220d963385a317264b11154c462a83596ed (diff) | |
download | linux-stable-97bd42b9c8be748ad85b362ba3bd401f4d35be80.tar.gz linux-stable-97bd42b9c8be748ad85b362ba3bd401f4d35be80.tar.bz2 linux-stable-97bd42b9c8be748ad85b362ba3bd401f4d35be80.zip |
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: Josef Bacik <jbacik@redhat.com>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r-- | fs/ext4/super.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index c81a8e759bad..425f42778efa 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -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; } |