From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752693AbcGTGzq (ORCPT ); Wed, 20 Jul 2016 02:55:46 -0400 Received: from mga01.intel.com ([192.55.52.88]:22469 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751375AbcGTGzo (ORCPT ); Wed, 20 Jul 2016 02:55:44 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,393,1464678000"; d="scan'208";a="1025343593" From: Ross Zwisler To: linux-kernel@vger.kernel.org Cc: Ross Zwisler , Andrew Morton , Dan Williams , Dave Chinner , Jan Kara , linux-nvdimm@ml01.01.org, Konstantin Khlebnikov Subject: [PATCH] radix-tree: fix comment about "exceptional" bits Date: Wed, 20 Jul 2016 00:55:31 -0600 Message-Id: <1468997731-2155-1-git-send-email-ross.zwisler@linux.intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The bottom two bits of radix tree entries are reserved for special use by the radix tree code itself. A comment detailing their usage was added by: commit 3bcadd6fa6c4 ("radix-tree: free up the bottom bit of exceptional entries for reuse") This comment states that if the bottom two bits are '11', this means that this is a locked exceptional entry. It turns out that this bit combination was never actually used. Radix tree locking for DAX was indeed implemented, but it actually used the third LSB: /* We use lowest available exceptional entry bit for locking */ #define RADIX_DAX_ENTRY_LOCK (1 << RADIX_TREE_EXCEPTIONAL_SHIFT) This locking code was also made specific to the DAX code instead of being generally implemented in radix-tree.h. So, fix the comment. Signed-off-by: Ross Zwisler --- include/linux/radix-tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index cb4b7e8..f0fb327 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h @@ -35,7 +35,7 @@ * 00 - data pointer * 01 - internal entry * 10 - exceptional entry - * 11 - locked exceptional entry + * 11 - this bit combination is currently unused/reserved * * The internal entry may be a pointer to the next level in the tree, a * sibling entry, or an indicator that the entry in this slot has been moved -- 2.7.4