Yang Erkun
1fd8bc7cd8
maple_tree: reload mas before the second call for mas_empty_area
...
Change the LONG_MAX in simple_offset_add to 1024, and do latter:
[root@fedora ~]# mkdir /tmp/dir
[root@fedora ~]# for i in {1..1024}; do touch /tmp/dir/$i; done
touch: cannot touch '/tmp/dir/1024': Device or resource busy
[root@fedora ~]# rm /tmp/dir/123
[root@fedora ~]# touch /tmp/dir/1024
[root@fedora ~]# rm /tmp/dir/100
[root@fedora ~]# touch /tmp/dir/1025
touch: cannot touch '/tmp/dir/1025': Device or resource busy
After we delete file 100, actually this is a empty entry, but the latter
create failed unexpected.
mas_alloc_cyclic has two chance to find empty entry. First find the entry
with range range_lo and range_hi, if no empty entry exist, and range_lo >
min, retry find with range min and range_hi. However, the first call
mas_empty_area may mark mas as EBUSY, and the second call for
mas_empty_area will return false directly. Fix this by reload mas before
second call for mas_empty_area.
[Liam.Howlett@Oracle.com: fix mas_alloc_cyclic() second search]
Link: https://lore.kernel.org/all/20241216060600.287B4C4CED0@smtp.kernel.org/
Link: https://lkml.kernel.org/r/20241216190113.1226145-2-Liam.Howlett@oracle.com
Link: https://lkml.kernel.org/r/20241214093005.72284-1-yangerkun@huaweicloud.com
Fixes: 9b6713cc7522 ("maple_tree: Add mtree_alloc_cyclic()")
Signed-off-by: Yang Erkun <yangerkun@huawei.com>
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Chuck Lever <chuck.lever@oracle.com> says:
Cc: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-12-30 17:59:07 -08:00
..
2024-10-02 17:23:23 -04:00
2024-11-19 10:28:41 -08:00
2024-11-03 12:36:54 -08:00
2024-06-24 13:18:02 +02:00
2024-12-02 11:34:44 -08:00
2024-10-02 17:23:23 -04:00
2024-10-02 17:23:23 -04:00
2024-10-28 21:44:28 +00:00
2024-10-02 17:23:23 -04:00
2024-05-19 14:36:18 -07:00
2024-08-15 09:26:02 -07:00
2024-11-28 11:17:30 -08:00
2024-09-13 17:28:35 +02:00
2024-10-02 17:23:23 -04:00
2024-07-04 23:43:11 -07:00
2024-07-03 19:30:23 -07:00
2024-10-02 17:23:23 -04:00
2024-08-15 09:26:02 -07:00
2024-12-18 19:04:46 -08:00
2023-09-19 13:21:33 -07:00
2024-06-24 22:25:06 -07:00
2024-03-12 13:09:23 -07:00
2024-06-24 22:25:06 -07:00
2024-09-01 20:43:33 -07:00
2024-07-12 16:39:53 -07:00
2024-06-24 22:25:06 -07:00
2023-10-14 20:25:22 -07:00
2024-02-01 13:06:40 +01:00
2024-07-12 08:55:02 +09:00
2024-07-28 15:49:18 -07:00
2024-07-06 11:39:51 -07:00
2024-10-17 21:30:32 +02:00
2024-09-01 20:43:30 -07:00
2024-10-30 15:29:59 +01:00
2024-09-01 20:43:29 -07:00
2023-08-25 13:22:10 -07:00
2024-06-24 22:25:06 -07:00
2024-04-09 22:06:00 -07:00
2024-11-07 14:25:16 -08:00
2023-06-07 21:25:00 -07:00
2024-06-18 10:40:52 -07:00
2023-11-03 07:08:36 -10:00
2024-11-05 17:12:31 -08:00
2024-10-28 18:33:10 +08:00
2023-12-29 12:22:26 -08:00
2024-10-15 17:30:33 +02:00
2024-07-26 14:33:09 -07:00
2023-06-09 17:44:17 -07:00
2024-10-02 17:23:23 -04:00
2024-07-28 15:49:18 -07:00
2024-10-02 17:23:23 -04:00
2024-09-01 20:43:27 -07:00
2023-06-09 17:44:17 -07:00
2023-06-09 17:44:15 -07:00
2024-10-14 08:21:09 +02:00
2024-02-22 15:38:52 -08:00
2024-06-24 22:25:11 -07:00
2024-07-30 09:30:11 -10:00
2024-09-01 20:43:29 -07:00
2024-10-31 19:19:36 -07:00
2023-11-25 09:43:18 +01:00
2023-08-18 10:18:55 -07:00
2024-09-01 20:43:33 -07:00
2024-06-18 10:40:52 -07:00
2024-05-21 15:29:01 -07:00
2024-02-22 15:38:52 -08:00
2024-09-01 20:25:44 -07:00
2024-03-13 00:03:21 -07:00
2023-08-30 17:04:28 -07:00
2024-09-09 09:41:47 -04:00
2024-09-09 16:47:41 -07:00
2023-12-06 16:12:46 -08:00
2024-06-24 22:25:06 -07:00
2024-10-02 17:23:23 -04:00
2023-12-21 10:02:28 -08:00
2024-10-03 18:20:12 +02:00
2024-04-22 17:11:20 -03:00
2024-10-29 07:14:29 +00:00
2024-11-18 16:50:08 -08:00
2024-08-20 17:13:40 +02:00
2024-06-24 22:25:06 -07:00
2024-11-25 16:09:48 -08:00
2024-11-28 11:17:30 -08:00
2024-11-11 00:26:44 -08:00
2023-12-05 11:14:40 +01:00
2024-04-25 21:07:05 -07:00
2023-12-05 11:14:40 +01:00
2024-08-06 13:42:40 +02:00
2024-05-22 11:53:02 -07:00
2024-06-12 13:24:05 +02:00
2024-02-08 16:39:25 +00:00
2023-08-21 13:46:25 -07:00
2024-09-12 12:20:21 +02:00
2023-04-17 18:01:23 +02:00
2023-08-15 14:57:25 -07:00
2024-11-05 17:12:33 -08:00
2024-11-05 17:12:30 -08:00
2023-10-16 12:44:06 -04:00
2024-12-02 12:16:57 +01:00
2024-10-14 16:33:24 -05:00
2024-09-01 20:43:29 -07:00
2023-10-16 12:44:06 -04:00
2024-11-27 10:20:50 -08:00
2024-12-30 17:59:07 -08:00
2024-06-24 22:25:05 -07:00
2024-11-05 17:12:34 -08:00
2023-06-06 13:18:32 +02:00
2024-02-22 19:01:55 -08:00
2023-08-18 10:19:00 -07:00
2023-08-18 10:18:55 -07:00
2024-06-10 11:14:52 +01:00
2024-11-07 14:14:58 -08:00
2024-11-19 08:48:27 -08:00
2024-10-07 16:36:25 -07:00
2024-10-03 15:32:04 -07:00
2024-09-01 20:43:34 -07:00
2024-11-06 20:11:14 -08:00
2024-06-24 22:25:10 -07:00
2023-08-21 13:07:22 -07:00
2023-06-12 11:31:50 -07:00
2024-11-19 10:43:44 -08:00
2024-10-03 18:20:19 +02:00
2024-07-04 23:43:10 -07:00
2023-10-10 10:14:27 +02:00
2023-06-05 15:28:42 -07:00
2024-09-01 20:43:32 -07:00
2024-09-20 00:20:06 -06:00
2024-11-05 17:12:40 -08:00
2024-02-15 12:17:28 -05:00
2024-06-24 22:25:07 -07:00
2024-10-02 17:23:23 -04:00
2024-11-16 21:19:39 +01:00
2024-06-24 22:25:03 -07:00
2024-12-05 19:54:45 -08:00
2024-12-05 19:54:47 -08:00
2024-06-28 08:54:55 -07:00
2024-11-02 13:08:55 -07:00
2024-06-28 08:54:55 -07:00
2024-12-01 12:17:16 -08:00
2024-11-11 00:26:43 -08:00
2024-08-19 11:31:18 -07:00
2024-06-18 10:40:52 -07:00
2024-05-09 09:25:08 -07:00
2024-08-28 06:54:39 -07:00
2024-06-24 22:25:11 -07:00
2024-10-03 18:20:23 +02:00
2024-06-04 17:40:02 +02:00
2024-12-02 11:34:44 -08:00
2023-06-06 21:39:55 +09:00
2024-09-01 20:43:40 -07:00
2024-05-19 14:36:20 -07:00
2024-05-19 14:36:20 -07:00
2024-06-24 22:25:11 -07:00
2024-06-24 22:25:11 -07:00
2024-06-24 22:25:11 -07:00
2024-09-01 20:25:52 -07:00
2024-06-24 22:25:11 -07:00
2024-06-24 22:25:07 -07:00
2024-06-24 22:25:11 -07:00
2024-06-24 22:25:07 -07:00
2024-06-24 22:25:11 -07:00
2024-11-11 13:09:42 -08:00
2024-06-24 22:25:11 -07:00
2024-06-24 22:25:11 -07:00
2024-11-05 17:12:35 -08:00
2024-06-24 22:25:11 -07:00
2024-06-10 11:14:52 +01:00
2024-09-01 20:43:23 -07:00
2024-10-03 18:20:27 +02:00
2024-10-28 14:32:43 -07:00
2024-06-24 22:25:11 -07:00
2024-06-03 18:51:18 -07:00
2024-10-03 18:20:29 +02:00
2024-06-24 22:25:11 -07:00
2024-06-24 22:25:11 -07:00
2024-06-24 22:25:11 -07:00
2024-06-24 22:25:11 -07:00
2024-07-03 19:30:05 -07:00
2024-06-24 22:25:06 -07:00
2024-03-04 17:01:22 -08:00
2024-07-03 19:30:05 -07:00
2024-06-24 22:25:11 -07:00
2023-12-29 12:22:29 -08:00
2024-06-24 22:25:04 -07:00
2024-06-24 22:25:04 -07:00
2024-06-24 22:25:04 -07:00
2024-04-15 17:42:43 -07:00
2024-04-24 15:45:38 -07:00
2023-09-13 10:18:42 -07:00
2024-07-30 13:04:36 -10:00
2024-07-02 10:11:45 -06:00
2024-07-08 23:44:01 +02:00
2024-11-11 17:17:05 -08:00
2024-11-30 22:41:35 -05:00
2024-05-19 09:21:03 -07:00
2024-10-02 17:23:23 -04:00