summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDev Jain <dev.jain@arm.com>2025-07-03 09:33:38 +0300
committerAndrew Morton <akpm@linux-foundation.org>2025-07-14 02:38:24 +0300
commit526f36f3f47b9ad29ffb1bf668b7f295287ee11b (patch)
tree3dc74b0973a9316d101f41c32f188956c3c76c2c /include/linux
parent8aa2c0bf0aa92044c8f20ba250448356da509859 (diff)
downloadlinux-526f36f3f47b9ad29ffb1bf668b7f295287ee11b.tar.xz
maple tree: add some comments
Add comments explaining the fields for maple_metadata, since "end" is ambiguous and "gap" can be confused as the largest gap, whereas it is actually the offset of the largest gap. Add comment for mas_ascend() to explain, whose min and max we are trying to find. Explain that, for example, if we are already on offset zero, then the parent min is mas->min, otherwise we need to walk up to find the implied pivot min. Link: https://lkml.kernel.org/r/20250703063338.51509-1-dev.jain@arm.com Signed-off-by: Dev Jain <dev.jain@arm.com> Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com> Cc: Wei Yang <richard.weiyang@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/maple_tree.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/maple_tree.h b/include/linux/maple_tree.h
index 9ef129038224..bafe143b1f78 100644
--- a/include/linux/maple_tree.h
+++ b/include/linux/maple_tree.h
@@ -75,8 +75,8 @@
* searching for gaps or any other code that needs to find the end of the data.
*/
struct maple_metadata {
- unsigned char end;
- unsigned char gap;
+ unsigned char end; /* end of data */
+ unsigned char gap; /* offset of largest gap */
};
/*