mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
btrfs: constify ulist parameter of ulist_next()
The ulist_next() iterator function does not need to change the given ulist so make it const. This will allow the next patch in the series to pass a ulist to a function that does not need, and should not, modify the ulist. Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
1baea6f18a
commit
fa104a8790
2 changed files with 2 additions and 2 deletions
|
@ -266,7 +266,7 @@ int ulist_del(struct ulist *ulist, u64 val, u64 aux)
|
||||||
* It is allowed to call ulist_add during an enumeration. Newly added items
|
* It is allowed to call ulist_add during an enumeration. Newly added items
|
||||||
* are guaranteed to show up in the running enumeration.
|
* are guaranteed to show up in the running enumeration.
|
||||||
*/
|
*/
|
||||||
struct ulist_node *ulist_next(struct ulist *ulist, struct ulist_iterator *uiter)
|
struct ulist_node *ulist_next(const struct ulist *ulist, struct ulist_iterator *uiter)
|
||||||
{
|
{
|
||||||
struct ulist_node *node;
|
struct ulist_node *node;
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ static inline int ulist_add_merge_ptr(struct ulist *ulist, u64 val, void *aux,
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ulist_node *ulist_next(struct ulist *ulist,
|
struct ulist_node *ulist_next(const struct ulist *ulist,
|
||||||
struct ulist_iterator *uiter);
|
struct ulist_iterator *uiter);
|
||||||
|
|
||||||
#define ULIST_ITER_INIT(uiter) ((uiter)->cur_list = NULL)
|
#define ULIST_ITER_INIT(uiter) ((uiter)->cur_list = NULL)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue