From: Wu Fengguang <wfg@mail.ustc.edu.cn>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@osdl.org>,
Christoph Lameter <clameter@sgi.com>,
Wu Fengguang <wfg@mail.ustc.edu.cn>
Subject: [PATCH 03/13] radixtree: sync with mainline
Date: Sat, 29 Oct 2005 14:02:19 +0800 [thread overview]
Message-ID: <20051029060238.104684000@localhost.localdomain> (raw)
In-Reply-To: <20051029060216.159380000@localhost.localdomain>
[-- Attachment #1: radixtree-sync-with-mainline.patch --]
[-- Type: text/plain, Size: 1190 bytes --]
The patch from Christoph Lameter:
[PATCH] radix-tree: Remove unnecessary indirections and clean up code
is only partially merged into -mm tree. This patch completes it.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn>
---
lib/radix-tree.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
--- linux-2.6.14-rc5-mm1.orig/lib/radix-tree.c
+++ linux-2.6.14-rc5-mm1/lib/radix-tree.c
@@ -286,27 +286,25 @@ static inline void **__lookup_slot(struc
unsigned long index)
{
unsigned int height, shift;
- struct radix_tree_node **slot;
+ struct radix_tree_node *slot;
height = root->height;
if (index > radix_tree_maxindex(height))
return NULL;
shift = (height-1) * RADIX_TREE_MAP_SHIFT;
- slot = &root->rnode;
+ slot = root->rnode;
while (height > 0) {
- if (*slot == NULL)
+ if (slot == NULL)
return NULL;
- slot = (struct radix_tree_node **)
- ((*slot)->slots +
- ((index >> shift) & RADIX_TREE_MAP_MASK));
+ slot = slot->slots[(index >> shift) & RADIX_TREE_MAP_MASK];
shift -= RADIX_TREE_MAP_SHIFT;
height--;
}
- return (void **)slot;
+ return slot;
}
/**
--
next prev parent reply other threads:[~2005-10-29 5:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-29 6:02 [PATCH 00/13] Adaptive read-ahead V5 Wu Fengguang
2005-10-29 6:02 ` [PATCH 01/13] mm: delayed page activation Wu Fengguang
2005-10-29 6:02 ` [PATCH 02/13] mm: balance page aging between zones Wu Fengguang
2005-10-29 6:02 ` Wu Fengguang [this message]
2005-10-29 6:02 ` [PATCH 04/13] radixtree: look-aside cache Wu Fengguang
2005-10-29 6:02 ` [PATCH 05/13] readahead: some preparation Wu Fengguang
2005-10-29 6:02 ` [PATCH 06/13] readahead: call scheme Wu Fengguang
2005-10-29 6:02 ` [PATCH 07/13] readahead: tunable parameters Wu Fengguang
2005-10-29 6:02 ` [PATCH 08/13] readahead: state based method Wu Fengguang
2005-10-29 6:02 ` [PATCH 09/13] readahead: context " Wu Fengguang
2005-10-29 6:02 ` [PATCH 10/13] readahead: other methods Wu Fengguang
2005-10-29 6:02 ` [PATCH 11/13] readahead: thrashing protection Wu Fengguang
2005-10-29 6:02 ` [PATCH 12/13] readahead: events accounting Wu Fengguang
2005-10-29 6:02 ` [PATCH 13/13] readahead: page aging accounting Wu Fengguang
2005-10-31 21:45 ` [PATCH 00/13] Adaptive read-ahead V5 Ram Pai
2005-11-01 3:04 ` Wu Fengguang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051029060238.104684000@localhost.localdomain \
--to=wfg@mail.ustc.edu.cn \
--cc=akpm@osdl.org \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome