[PATCH] erofs-utils: use hash_for_each_safe in erofs_cleanxattrs

Gao Xiang hsiangkao at redhat.com
Fri Nov 27 21:41:19 AEDT 2020


On Fri, Nov 27, 2020 at 06:16:13PM +0800, Huang Jianan wrote:
> Signed-off-by: Huang Jianan <huangjianan at oppo.com>
> Signed-off-by: Guo Weichao <guoweichao at oppo.com>

Reviewed-by: Gao Xiang <hsiangkao at redhat.com>

Thanks,
Gao Xiang

> ---
>  lib/xattr.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/xattr.c b/lib/xattr.c
> index f9ec78c..2596601 100644
> --- a/lib/xattr.c
> +++ b/lib/xattr.c
> @@ -506,8 +506,9 @@ static void erofs_cleanxattrs(bool sharedxattrs)
>  {
>  	unsigned int i;
>  	struct xattr_item *item;
> +	struct hlist_node *tmp;
>  
> -	hash_for_each(ea_hashtable, i, item, node) {
> +	hash_for_each_safe(ea_hashtable, i, tmp, item, node) {
>  		if (sharedxattrs && item->shared_xattr_id >= 0)
>  			continue;
>  
> -- 
> 2.25.1
> 



More information about the Linux-erofs mailing list