summaryrefslogtreecommitdiff
path: root/include/linux/idr.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-11-08 19:46:49 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2019-11-08 19:46:49 +0300
commit410ef736a77b584e1c54a3784ee56ca63114ce11 (patch)
tree53eb74b71298aee02b9acf8d33a2b82a392948c8 /include/linux/idr.h
parent4d8b3262af02c4245ac396b7f2bc71eb328931e2 (diff)
parentb7e9728f3d7fc5c5c8508d99f1675212af5cfd49 (diff)
downloadlinux-410ef736a77b584e1c54a3784ee56ca63114ce11.tar.xz
Merge tag 'xarray-5.4' of git://git.infradead.org/users/willy/linux-dax
Pull XArray fixes from Matthew Wilcox: "These all fix various bugs, some of which people have tripped over and some of which have been caught by automatic tools" * tag 'xarray-5.4' of git://git.infradead.org/users/willy/linux-dax: idr: Fix idr_alloc_u32 on 32-bit systems idr: Fix integer overflow in idr_for_each_entry radix tree: Remove radix_tree_iter_find idr: Fix idr_get_next_ul race with idr_remove XArray: Fix xas_next() with a single entry at 0
Diffstat (limited to 'include/linux/idr.h')
-rw-r--r--include/linux/idr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/idr.h b/include/linux/idr.h
index 4ec8986e5dfb..ac6e946b6767 100644
--- a/include/linux/idr.h
+++ b/include/linux/idr.h
@@ -185,7 +185,7 @@ static inline void idr_preload_end(void)
* is convenient for a "not found" value.
*/
#define idr_for_each_entry(idr, entry, id) \
- for (id = 0; ((entry) = idr_get_next(idr, &(id))) != NULL; ++id)
+ for (id = 0; ((entry) = idr_get_next(idr, &(id))) != NULL; id += 1U)
/**
* idr_for_each_entry_ul() - Iterate over an IDR's elements of a given type.