diff options
| author | Konstantin Khlebnikov <[email protected]> | 2012-03-28 21:42:54 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2012-03-29 00:14:37 +0000 |
| commit | 0fc9d1040313047edf6a39fd4d7c7defdca97c62 (patch) | |
| tree | 4503c084da1097e1cf66d8bac1ec548bc69ce69a /lib/mpi/mpi-inv.c | |
| parent | radix-tree: rewrite gang lookup using iterator (diff) | |
| download | kernel-0fc9d1040313047edf6a39fd4d7c7defdca97c62.tar.gz kernel-0fc9d1040313047edf6a39fd4d7c7defdca97c62.zip | |
radix-tree: use iterators in find_get_pages* functions
Replace radix_tree_gang_lookup_slot() and
radix_tree_gang_lookup_tag_slot() in page-cache lookup functions with
brand-new radix-tree direct iterating. This avoids the double-scanning
and pointer copying.
Iterator don't stop after nr_pages page-get fails in a row, it continue
lookup till the radix-tree end. Thus we can safely remove these restart
conditions.
Unfortunately, old implementation didn't forbid nr_pages == 0, this corner
case does not fit into new code, so the patch adds an extra check at the
beginning.
Signed-off-by: Konstantin Khlebnikov <[email protected]>
Tested-by: Hugh Dickins <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-inv.c')
0 files changed, 0 insertions, 0 deletions
