• J
    lib: radix_tree: tree node interface · 139e5616
    Johannes Weiner 提交于
    Make struct radix_tree_node part of the public interface and provide API
    functions to create, look up, and delete whole nodes.  Refactor the
    existing insert, look up, delete functions on top of these new node
    primitives.
    
    This will allow the VM to track and garbage collect page cache radix
    tree nodes.
    
    [sasha.levin@oracle.com: return correct error code on insertion failure]
    Signed-off-by: NJohannes Weiner <hannes@cmpxchg.org>
    Reviewed-by: NRik van Riel <riel@redhat.com>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Bob Liu <bob.liu@oracle.com>
    Cc: Christoph Hellwig <hch@infradead.org>
    Cc: Dave Chinner <david@fromorbit.com>
    Cc: Greg Thelen <gthelen@google.com>
    Cc: Hugh Dickins <hughd@google.com>
    Cc: Jan Kara <jack@suse.cz>
    Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
    Cc: Luigi Semenzato <semenzato@google.com>
    Cc: Mel Gorman <mgorman@suse.de>
    Cc: Metin Doslu <metin@citusdata.com>
    Cc: Michel Lespinasse <walken@google.com>
    Cc: Ozgun Erdogan <ozgun@citusdata.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Roman Gushchin <klamm@yandex-team.ru>
    Cc: Ryan Mallon <rmallon@gmail.com>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Signed-off-by: NSasha Levin <sasha.levin@oracle.com>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    139e5616
radix-tree.h 17.0 KB