Hi,

Sergiu Ivanov wrote:
> diff --git a/eth-multiplexer/netfs_impl.c b/eth-multiplexer/netfs_impl.c
> index c70701b..875ff48 100644
> --- a/eth-multiplexer/netfs_impl.c
> +++ b/eth-multiplexer/netfs_impl.c
> @@ -31,6 +31,10 @@
>  #include "vdev.h"
>  #include "util.h"
>  
> +/* The .MASTER node which will be used by static instances of
> +   devnode.  */
> +struct node * master_node;
> +
>  #define DIRENTS_CHUNK_SIZE      (8*1024)
>  /* Returned directory entries are aligned to blocks this many bytes long.
>   * Must be a power of two.  */
> @@ -85,6 +89,18 @@ new_node (struct lnode *ln, struct node **np)
>  struct node *
>  lookup (char *name)
>  {
> +  if (strcmp(name, MASTER_NODE_NAME) == 0)
> +    {
> +      netfs_nref (master_node);
> +
> +      /* netfs_attempt_lookup expects the returned node not to be
> +      locked, while `master_node` might have been locked in the
> +      previous lookups.  */
> +      mutex_unlock (&master_node->lock);
So the lock might or might not have been locked? Why is it so?
> +
> +      return master_node;
> +    }
> +

Best regards,
Zheng Da


Reply via email to