core: fix and simplify generic_getfssec() syslinux-4.00-pre29
authorH. Peter Anvin <hpa@zytor.com>
Sat, 27 Feb 2010 04:40:21 +0000 (20:40 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Sat, 27 Feb 2010 04:40:21 +0000 (20:40 -0800)
commitf822d01851e0404e00cd198bdf3d12b76aba53b5
tree78da9950b8c09e2e42e30386a2dd12e613b3edc7
parent0458be0391b4a7448e2a1911427c4c1800fe7145
core: fix and simplify generic_getfssec()

Both simplify and fix generic_getfssec().  The previous version would
occasionally request the same extent twice from the underlying layer.
This is not a big deal for ext2fs for example, but is *very* expensive
on FAT, where any out-of-order next_extent() call means walking the
FAT from the beginning.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
core/fs/getfssec.c