Re: [PATCH 01/18] kernel: add bl_list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dave Chinner <david@xxxxxxxxxxxxx> writes:

> +static inline void __hlist_bl_del(struct hlist_bl_node *n)
> +{
> +	struct hlist_bl_node *next = n->next;
> +	struct hlist_bl_node **pprev = n->pprev;
> +
> +	LIST_BL_BUG_ON((unsigned long)n & LIST_BL_LOCKMASK);
> +
> +	/* pprev may be `first`, so be careful not to lose the lock bit */
> +	*pprev = (struct hlist_bl_node *)
> +			((unsigned long)next |
> +			 ((unsigned long)*pprev & LIST_BL_LOCKMASK));
> +	if (next)
> +		next->pprev = pprev;
> +}

Should this set n->pprev to NULL so that unhashed returns true
afterwards?


> +
> +static inline void hlist_bl_del(struct hlist_bl_node *n)
> +{
> +	__hlist_bl_del(n);
> +	n->next = BL_LIST_POISON1;
> +	n->pprev = BL_LIST_POISON2;
> +}

Ok so unhashed only works once. Seems unsymmetric.

Other than that looks good to me.

Reviewed-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>

-Andi

-- 
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux