|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 12/17] xen/hypfs: add new enter() and exit() per node callbacks
On 01.12.2020 09:21, Juergen Gross wrote:
> @@ -100,11 +112,58 @@ static void hypfs_unlock(void)
> }
> }
>
> +const struct hypfs_entry *hypfs_node_enter(const struct hypfs_entry *entry)
> +{
> + return entry;
> +}
> +
> +void hypfs_node_exit(const struct hypfs_entry *entry)
> +{
> +}
> +
> +static int node_enter(const struct hypfs_entry *entry)
> +{
> + const struct hypfs_entry **last = &this_cpu(hypfs_last_node_entered);
> +
> + entry = entry->funcs->enter(entry);
> + if ( IS_ERR(entry) )
> + return PTR_ERR(entry);
> +
> + ASSERT(!*last || *last == entry->parent);
> +
> + *last = entry;
In such a callback case I wonder whether you wouldn't want to also
guard against NULL coming back, perhaps simply by mistake, but of
course once handling it here such could even become permissible
behavior.
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |