summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-02-27 17:05:07 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-27 19:10:20 -0800
commit54616283c2948812a44240858ced610e7cacbde1 (patch)
tree268bbe9049d9370d5b644dfde51fc4a8942bae3b /include/linux
parent050a6b47d98e2bcea909c1129111e721668aaa2c (diff)
idr: add idr_layer->prefix
Add a field which carries the prefix of ID the idr_layer covers. This will be used to implement lookup hint. This patch doesn't make use of the new field and doesn't introduce any behavior difference. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/idr.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/idr.h b/include/linux/idr.h
index 43b87b1c77a..7b1c5c6f9a0 100644
--- a/include/linux/idr.h
+++ b/include/linux/idr.h
@@ -28,6 +28,7 @@
#define IDR_MASK ((1 << IDR_BITS)-1)
struct idr_layer {
+ int prefix; /* the ID prefix of this idr_layer */
DECLARE_BITMAP(bitmap, IDR_SIZE); /* A zero bit means "space here" */
struct idr_layer __rcu *ary[1<<IDR_BITS];
int count; /* When zero, we can release it */