From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754216Ab3LBWZW (ORCPT ); Mon, 2 Dec 2013 17:25:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55622 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752294Ab3LBWZU (ORCPT ); Mon, 2 Dec 2013 17:25:20 -0500 Message-ID: <529D0896.2090707@redhat.com> Date: Mon, 02 Dec 2013 17:24:22 -0500 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Johannes Weiner CC: Andrew Morton , Andi Kleen , Andrea Arcangeli , Christoph Hellwig , Dave Chinner , Greg Thelen , Hugh Dickins , Jan Kara , KOSAKI Motohiro , Mel Gorman , Metin Doslu , Michel Lespinasse , Minchan Kim , Ozgun Erdogan , Peter Zijlstra , Roman Gushchin , Ryan Mallon , Tejun Heo , Vlastimil Babka , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [patch 2/9] lib: radix-tree: radix_tree_delete_item() References: <1386012108-21006-1-git-send-email-hannes@cmpxchg.org> <1386012108-21006-3-git-send-email-hannes@cmpxchg.org> In-Reply-To: <1386012108-21006-3-git-send-email-hannes@cmpxchg.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/02/2013 02:21 PM, 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 Reviewed-by: Rik van Riel -- All rights reversed