mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-11 08:18:47 +00:00
Squashfs: fix f_pos check in get_dir_index_using_offset
One off error in the f_pos check. If f_pos is 3 or less don't bother reading the index because we're at the start of the directory, and we obviously already know where that is on disk. This eliminates an unnecessary read. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
This commit is contained in:
parent
47f4396e51
commit
2158d3fd27
@ -64,7 +64,7 @@ static int get_dir_index_using_offset(struct super_block *sb,
|
|||||||
* is offset by 3 because we invent "." and ".." entries which are
|
* is offset by 3 because we invent "." and ".." entries which are
|
||||||
* not actually stored in the directory.
|
* not actually stored in the directory.
|
||||||
*/
|
*/
|
||||||
if (f_pos < 3)
|
if (f_pos <= 3)
|
||||||
return f_pos;
|
return f_pos;
|
||||||
f_pos -= 3;
|
f_pos -= 3;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user