linux-erofs.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] erofs-utils: use hash_for_each_safe in erofs_cleanxattrs
@ 2020-11-27 10:16 Huang Jianan
  2020-11-27 10:41 ` Gao Xiang
  0 siblings, 1 reply; 2+ messages in thread
From: Huang Jianan @ 2020-11-27 10:16 UTC (permalink / raw)
  To: linux-erofs; +Cc: liufeibao, guoweichao, zhangshiming

Signed-off-by: Huang Jianan <huangjianan@oppo.com>
Signed-off-by: Guo Weichao <guoweichao@oppo.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] erofs-utils: use hash_for_each_safe in erofs_cleanxattrs
  2020-11-27 10:16 [PATCH] erofs-utils: use hash_for_each_safe in erofs_cleanxattrs Huang Jianan
@ 2020-11-27 10:41 ` Gao Xiang
  0 siblings, 0 replies; 2+ messages in thread
From: Gao Xiang @ 2020-11-27 10:41 UTC (permalink / raw)
  To: Huang Jianan; +Cc: liufeibao, guoweichao, linux-erofs, zhangshiming

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

Reviewed-by: Gao Xiang <hsiangkao@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
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-27 10:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-27 10:16 [PATCH] erofs-utils: use hash_for_each_safe in erofs_cleanxattrs Huang Jianan
2020-11-27 10:41 ` Gao Xiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).