diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-11-08 19:46:49 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-11-08 19:46:49 +0300 |
commit | 410ef736a77b584e1c54a3784ee56ca63114ce11 (patch) | |
tree | 53eb74b71298aee02b9acf8d33a2b82a392948c8 /include | |
parent | 4d8b3262af02c4245ac396b7f2bc71eb328931e2 (diff) | |
parent | b7e9728f3d7fc5c5c8508d99f1675212af5cfd49 (diff) | |
download | linux-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')
-rw-r--r-- | include/linux/idr.h | 2 | ||||
-rw-r--r-- | include/linux/radix-tree.h | 18 |
2 files changed, 1 insertions, 19 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. diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index b5116013f27e..63e62372443a 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h @@ -316,24 +316,6 @@ radix_tree_iter_lookup(const struct radix_tree_root *root, } /** - * radix_tree_iter_find - find a present entry - * @root: radix tree root - * @iter: iterator state - * @index: start location - * - * This function returns the slot containing the entry with the lowest index - * which is at least @index. If @index is larger than any present entry, this - * function returns NULL. The @iter is updated to describe the entry found. - */ -static inline void __rcu ** -radix_tree_iter_find(const struct radix_tree_root *root, - struct radix_tree_iter *iter, unsigned long index) -{ - radix_tree_iter_init(iter, index); - return radix_tree_next_chunk(root, iter, 0); -} - -/** * radix_tree_iter_retry - retry this chunk of the iteration * @iter: iterator state * |