NeilBrown 95a99ac112 Fix termination state for idr_for_each_entry_ul()
[ Upstream commit e8ae8ad479e2d037daa33756e5e72850a7bd37a9 ]

The comment for idr_for_each_entry_ul() states

  after normal termination @entry is left with the value NULL

This is not correct in the case where UINT_MAX has an entry in the idr.
In that case @entry will be non-NULL after termination.
No current code depends on the documentation being correct, but to
save future code we should fix it.

Also fix idr_for_each_entry_continue_ul().  While this is not documented
as leaving @entry as NULL, the mellanox driver appears to depend on
it doing so.  So make that explicit in the documentation as well as in
the code.

Fixes: e33d2b74d805 ("idr: fix overflow case for idr_for_each_entry_ul()")
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Chris Mi <chrism@mellanox.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:08:28 +01:00
..
2023-07-23 13:46:54 +02:00
2021-07-21 19:54:21 -07:00
2023-11-08 17:26:42 +01:00
2021-09-20 12:43:34 +01:00
2023-08-11 15:13:51 +02:00
2021-08-29 14:47:42 +03:00
2022-08-17 14:23:11 +02:00
2022-10-26 12:35:12 +02:00
2021-08-31 09:41:22 -07:00
2022-08-31 17:16:34 +02:00
2023-10-10 21:59:06 +02:00
2021-08-16 10:50:32 -06:00
2021-08-26 16:52:03 -07:00
2021-12-14 10:57:11 +01:00
2021-11-25 09:48:41 +01:00
2021-07-20 09:20:49 -07:00
2021-09-07 21:17:28 +02:00
2023-03-30 12:47:50 +02:00
2021-08-26 15:32:28 -04:00
2021-07-27 11:00:36 +02:00
2021-09-06 07:20:56 -04:00
2023-08-30 16:18:19 +02:00
2021-07-26 15:09:44 +02:00
2021-07-27 20:11:45 +01:00
2021-07-27 20:11:44 +01:00
2021-08-05 11:46:42 +01:00
2021-09-03 10:44:35 -07:00
2022-10-26 12:35:26 +02:00
2021-07-27 17:05:06 +01:00
2021-07-27 09:29:15 +02:00
2022-08-17 14:24:08 +02:00
2022-07-12 16:35:08 +02:00
2023-08-03 10:22:30 +02:00
2023-11-20 11:08:16 +01:00
2023-06-21 15:59:15 +02:00
2023-08-26 14:23:39 +02:00
2021-09-17 13:52:17 +01:00
2021-09-07 19:13:42 -07:00
2022-07-02 16:41:17 +02:00
2021-08-18 22:08:24 +02:00
2023-08-03 10:22:26 +02:00
2021-10-07 16:51:57 +02:00
2023-10-19 23:05:33 +02:00
2023-10-19 23:05:33 +02:00
2021-08-17 17:50:51 +02:00
2022-07-12 16:35:08 +02:00
2021-08-31 16:43:06 -07:00
2021-08-06 13:41:48 -07:00
2021-08-19 09:02:55 +09:00
2021-11-21 13:44:12 +01:00
2021-09-09 13:25:49 -07:00
2021-07-27 12:17:21 +02:00
2022-07-29 17:25:32 +02:00
2021-07-27 12:12:08 +02:00
2022-09-15 11:30:05 +02:00
2021-08-11 06:44:24 -04:00