Squashfs: optimise squashfs_cache_get entry search
authorAjeet Yadav <ajeet.yadav.77@gmail.com>
Tue, 27 Dec 2011 09:40:04 +0000 (15:10 +0530)
committerPhillip Lougher <phillip@squashfs.org.uk>
Fri, 30 Dec 2011 01:24:13 +0000 (01:24 +0000)
commitd7fbd893388d9e86d29b7cfbd5457bcf03496fbf
treeea94d043ee3e842f7273391b143a5949afb39975
parent89cab5b5727d3139adc247e3a3d4ee5b10e3eda5
Squashfs: optimise squashfs_cache_get entry search

squashfs_cache_get() iterates over all entries to search for
 block its looking for. Often get() / put() are called for
 same block.

If we cache the current entry index, then we can optimise the
subsequent *_get() calls.

Signed-off-by: Ajeet Yadav <ajeet.yadav.77@gmail.com>
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
fs/squashfs/cache.c
fs/squashfs/squashfs_fs_sb.h