[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130820135903.22edb28c2f43e0b77bf085eb@linux-foundation.org>
Date: Tue, 20 Aug 2013 13:59:03 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Johannes Weiner <hannes@...xchg.org>
Cc: Andi Kleen <andi@...stfloor.org>,
Andrea Arcangeli <aarcange@...hat.com>,
Greg Thelen <gthelen@...gle.com>,
Christoph Hellwig <hch@...radead.org>,
Hugh Dickins <hughd@...gle.com>, Jan Kara <jack@...e.cz>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Mel Gorman <mgorman@...e.de>,
Minchan Kim <minchan.kim@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
Rik van Riel <riel@...hat.com>,
Michel Lespinasse <walken@...gle.com>,
Seth Jennings <sjenning@...ux.vnet.ibm.com>,
Roman Gushchin <klamm@...dex-team.ru>,
Ozgun Erdogan <ozgun@...usdata.com>,
Metin Doslu <metin@...usdata.com>,
Vlastimil Babka <vbabka@...e.cz>, linux-mm@...ck.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [patch 1/9] lib: radix-tree: radix_tree_delete_item()
On Sat, 17 Aug 2013 15:31:15 -0400 Johannes Weiner <hannes@...xchg.org> wrote:
> Provide a function that does not just delete an entry at a given
> index, but also allows passing in an expected item. Delete only if
> that item is still located at the specified index.
>
> This is handy when lockless tree traversals want to delete entries as
> well because they don't have to do an second, locked lookup to verify
> the slot has not changed under them before deleting the entry.
>
> ...
>
> -void *radix_tree_delete(struct radix_tree_root *root, unsigned long index)
> +void *radix_tree_delete_item(struct radix_tree_root *root,
> + unsigned long index, void *item)
radix-tree is an exported-to-modules API, so I guess we should do this
so others don't need to..
--- a/lib/radix-tree.c~lib-radix-tree-radix_tree_delete_item-fix
+++ a/lib/radix-tree.c
@@ -1393,6 +1393,7 @@ void *radix_tree_delete_item(struct radi
out:
return slot;
}
+EXPORT_SYMBOL(radix_tree_delete_item);
/**
* radix_tree_delete - delete an item from a radix tree
_
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists