From mboxrd@z Thu Jan 1 00:00:00 1970 From: Minchan Kim Subject: Re: [patch 2/9] lib: radix-tree: radix_tree_delete_item() Date: Mon, 25 Nov 2013 17:21:02 +0900 Message-ID: <20131125082102.GB4731@bbox> References: <1385336308-27121-1-git-send-email-hannes@cmpxchg.org> <1385336308-27121-3-git-send-email-hannes@cmpxchg.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , Dave Chinner , Rik van Riel , Jan Kara , Vlastimil Babka , Peter Zijlstra , Tejun Heo , Andi Kleen , Andrea Arcangeli , Greg Thelen , Christoph Hellwig , Hugh Dickins , KOSAKI Motohiro , Mel Gorman , Michel Lespinasse , Seth Jennings , Roman Gushchin , Ozgun Erdogan , Metin Doslu , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Johannes Weiner Return-path: Received: from lgeamrelo01.lge.com ([156.147.1.125]:44377 "EHLO LGEAMRELO01.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752273Ab3KYIUQ (ORCPT ); Mon, 25 Nov 2013 03:20:16 -0500 Content-Disposition: inline In-Reply-To: <1385336308-27121-3-git-send-email-hannes@cmpxchg.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun, Nov 24, 2013 at 06:38:21PM -0500, Johannes Weiner 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. > > Signed-off-by: Johannes Weiner Reviewed-by: Minchan Kim -- Kind regards, Minchan Kim