|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 1/7] xenstore: fix add_change_node()
On Thu, Oct 27, 2016 at 11:55:52AM +0200, Juergen Gross wrote:
> add_change_node() in xenstored is used to add a modified node to the
> list of changed nodes of one transaction. It is being called with the
> recurse parameter set to true when removing a node in order to get
> watches for children of the node fired at transaction end, too.
>
> If, however, the node to be deleted had been modified in the same
> transaction the recurse parameter of add_change_node() is lost as
> an entry already in the list of the changed nodes won't be entered
> again.
>
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>
I think we should apply this to 4.8, too. I will wait a bit for
different opinions.
(I've only looked at this patch in this series because I caught the
"fix" in subject line)
> ---
> Candidate for backport
> ---
> tools/xenstore/xenstored_transaction.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tools/xenstore/xenstored_transaction.c
> b/tools/xenstore/xenstored_transaction.c
> index 34720fa..3c0b8f7 100644
> --- a/tools/xenstore/xenstored_transaction.c
> +++ b/tools/xenstore/xenstored_transaction.c
> @@ -103,8 +103,11 @@ void add_change_node(struct transaction *trans, const
> char *node, bool recurse)
> }
>
> list_for_each_entry(i, &trans->changes, list)
> - if (streq(i->node, node))
> + if (streq(i->node, node)) {
> + if (recurse)
> + i->recurse = recurse;
> return;
> + }
I would like to add {} around list_for_each_entry. No need to resend.
Wei.
>
> i = talloc(trans, struct changed_node);
> i->node = talloc_strdup(i, node);
> --
> 2.6.6
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |