fs/squashfs: Fix index off by 1 for inode SQFS_LDIR_TYPE
authorGerard Koskamp <gerard.koskamp@nedap.com>
Fri, 30 Oct 2020 13:41:58 +0000 (13:41 +0000)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 15 Nov 2021 10:37:12 +0000 (11:37 +0100)
commit675c91ed0602d75e2731502664a4137fb7a1ca49
treece586a5a8269f02fba5aca5099f888c6412028f9
parentf918fd9538796832a2fce3efae6c7ae57c084535
fs/squashfs: Fix index off by 1 for inode SQFS_LDIR_TYPE

I've created a squashfs file system with Yocto (it use squashfs-tools)
and u-boot command sqfsls give the error:'Error while searching inode:
unknown type.'
After some digging in the code I found that the index is off by 1.
This patch fix this issue and I can successful use the sqfsls command.
After search for the squashfs format I found a link talk about a
similar issue but this time in the documentation. The link is:
https://github.com/AgentD/squashfs-tools-ng/commit/e6588526838caece9529

Signed-off-by: Gerard Koskamp <gerard.koskamp@nedap.com>
Tested-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
[jh80.chung: cherry picked from mainline commit c49b0eb034710f08fc68cbfa2c23811e10667ad9]
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I02ba72c07ea7c57ebace7103357e2b81bcf48772
fs/squashfs/sqfs_inode.c