<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Looks like it's not needed on it's own, because the other patch that it fixes in the commit message:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
"Fixes: c68ade41961d4 ("radix-tree: save previous gfp_t tags in radix tree"</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Is marked as dropped in the table.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
So i guess we can drop this one too.<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Konstantin Khorenko <khorenko@virtuozzo.com><br>
<b>Sent:</b> Monday, June 7, 2021 7:14 PM<br>
<b>To:</b> Valeriy Vdovin <Valeriy.Vdovin@virtuozzo.com><br>
<b>Cc:</b> devel@openvz.org <devel@openvz.org><br>
<b>Subject:</b> Re: [VZ8 PATCH] lib/radix-tree: fixup for BUG_ON in __radix_tree_insert()</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Valera, please recheck if we need it in vz8.<br>
i guess - no.<br>
<br>
--<br>
Best regards,<br>
<br>
Konstantin Khorenko,<br>
Virtuozzo Linux Kernel Team<br>
<br>
On 06/04/2021 04:01 PM, Valeriy Vdovin wrote:<br>
> From: Vasily Averin <vvs@virtuozzo.com><br>
><br>
> __radix_tree_insert() triggers BUG_ON if root have set any prev tag<br>
> bits. Let's ignore prev tag bits.<br>
><br>
> Fixes: c68ade41961d4 ("radix-tree: save previous gfp_t tags in radix tree<br>
> for dirty memory accounting")<br>
><br>
> <a href="https://jira.sw.ru/browse/PSBM-100579">https://jira.sw.ru/browse/PSBM-100579</a><br>
> Signed-off-by: Vasily Averin <vvs@virtuozzo.com><br>
> (cherry-picked from 5ddc0f15746712d643895dd4756e330f4a26ffeb)<br>
> <a href="https://jira.sw.ru/browse/PSBM-127849">https://jira.sw.ru/browse/PSBM-127849</a><br>
> Signed-off-by: Valeriy Vdovin <valeriy.vdovin@virtuozzo.com><br>
> ---<br>
> include/linux/radix-tree.h | 2 ++<br>
> lib/radix-tree.c | 2 +-<br>
> 2 files changed, 3 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h<br>
> index d9f3cf0a4c4d..fe681dd5c06b 100644<br>
> --- a/include/linux/radix-tree.h<br>
> +++ b/include/linux/radix-tree.h<br>
> @@ -75,6 +75,8 @@ static inline bool radix_tree_is_internal_node(void *ptr)<br>
> #define RADIX_TREE_TAG_LONGS XA_MARK_LONGS<br>
> #endif<br>
><br>
> +#define RADIX_ROOT_TAG_MASK (((1<<RADIX_TREE_MAX_TAGS)-1) << __GFP_BITS_SHIFT)<br>
> +<br>
> #define RADIX_TREE_INDEX_BITS (8 /* CHAR_BIT */ * sizeof(unsigned long))<br>
> #define RADIX_TREE_MAX_PATH (DIV_ROUND_UP(RADIX_TREE_INDEX_BITS, \<br>
> RADIX_TREE_MAP_SHIFT))<br>
> diff --git a/lib/radix-tree.c b/lib/radix-tree.c<br>
> index 310e89cc0f92..28591214be53 100644<br>
> --- a/lib/radix-tree.c<br>
> +++ b/lib/radix-tree.c<br>
> @@ -167,7 +167,7 @@ static inline int root_tag_get(const struct radix_tree_root *root, unsigned tag)<br>
><br>
> static inline unsigned root_tags_get(const struct radix_tree_root *root)<br>
> {<br>
> - return (__force unsigned)root->xa_flags >> ROOT_TAG_SHIFT;<br>
> + return (__force unsigned)(root->xa_flags & RADIX_ROOT_TAG_MASK) >> __GFP_BITS_SHIFT;<br>
> }<br>
><br>
> static inline bool is_idr(const struct radix_tree_root *root)<br>
><br>
</div>
</span></font></div>
</body>
</html>