From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51]) by kanga.kvack.org (Postfix) with ESMTP id 38B856B0088 for ; Mon, 25 Nov 2013 03:20:21 -0500 (EST) Received: by mail-pb0-f51.google.com with SMTP id up15so5185934pbc.38 for ; Mon, 25 Nov 2013 00:20:20 -0800 (PST) Received: from LGEAMRELO01.lge.com (lgeamrelo01.lge.com. [156.147.1.125]) by mx.google.com with ESMTP id yg5si27023714pbc.356.2013.11.25.00.20.16 for ; Mon, 25 Nov 2013 00:20:17 -0800 (PST) Date: Mon, 25 Nov 2013 17:21:02 +0900 From: Minchan Kim Subject: Re: [patch 2/9] lib: radix-tree: radix_tree_delete_item() 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 Content-Disposition: inline In-Reply-To: <1385336308-27121-3-git-send-email-hannes@cmpxchg.org> Sender: owner-linux-mm@kvack.org List-ID: To: Johannes Weiner 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 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 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org