Commit 1cb08e97389bb603e1b999312d9686c8faf0187a

Authored by Phillip Lougher
1 parent 792590c723

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>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

... ... @@ -275,7 +275,8 @@
275 275  
276 276 err = squashfs_read_inode(root, root_inode);
277 277 if (err) {
278   - iget_failed(root);
  278 + make_bad_inode(root);
  279 + iput(root);
279 280 goto failed_mount;
280 281 }
281 282 insert_inode_hash(root);