From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161809AbcA0VSH (ORCPT ); Wed, 27 Jan 2016 16:18:07 -0500 Received: from mga01.intel.com ([192.55.52.88]:18548 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161751AbcA0VSB (ORCPT ); Wed, 27 Jan 2016 16:18:01 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,356,1449561600"; d="scan'208";a="735380264" From: Matthew Wilcox To: Andrew Morton , Hugh Dickins , Ohad Ben-Cohen Cc: Matthew Wilcox , Konstantin Khlebnikov , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 0/5] Fix races & improve the radix tree iterator patterns Date: Wed, 27 Jan 2016 16:17:47 -0500 Message-Id: <1453929472-25566-1-git-send-email-matthew.r.wilcox@intel.com> X-Mailer: git-send-email 2.7.0.rc3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matthew Wilcox The first two patches here are bugfixes, and I would like to see them make their way into stable ASAP since they can lead to data corruption (very low probabilty). The last three patches do not qualify as bugfixes. They simply improve the standard pattern used to do radix tree iterations by removing the 'goto restart' part. Partially this is because this is an ugly & confusing goto, and partially because with multi-order entries in the tree, it'll be more likely that we'll see an indirect_ptr bit, and it's more efficient to kep going from the point of the iteration we're currently in than restart from the beginning each time. Matthew Wilcox (5): radix-tree: Fix race in gang lookup hwspinlock: Fix race between radix tree insertion and lookup btrfs: Use radix_tree_iter_retry() mm: Use radix_tree_iter_retry() radix-tree,shmem: Introduce radix_tree_iter_next() drivers/hwspinlock/hwspinlock_core.c | 4 +++ fs/btrfs/tests/btrfs-tests.c | 3 +- include/linux/radix-tree.h | 31 +++++++++++++++++++++ lib/radix-tree.c | 12 ++++++-- mm/filemap.c | 53 ++++++++++++------------------------ mm/shmem.c | 30 ++++++++++---------- 6 files changed, 78 insertions(+), 55 deletions(-) -- 2.7.0.rc3