squashfs: fix warn_on when root inode is corrupted

Fix warn_on triggered by mounting a fsfuzzer corrupted file system, where
the root inode has been corrupted.

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
Reported-by: Steve Grubb <sgrubb@redhat.com>
This commit is contained in:
Phillip Lougher 2010-04-16 01:01:36 +01:00
parent 792590c723
commit 1cb08e9738
1 changed files with 2 additions and 1 deletions

View File

@ -275,7 +275,8 @@ allocate_root:
err = squashfs_read_inode(root, root_inode);
if (err) {
iget_failed(root);
make_bad_inode(root);
iput(root);
goto failed_mount;
}
insert_inode_hash(root);