All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Jianan <huangjianan@oppo.com>
To: linux-erofs@lists.ozlabs.org
Cc: liufeibao@oppo.com, guoweichao@oppo.com, zhangshiming@oppo.com
Subject: [PATCH] erofs-utils: use hash_for_each_safe in erofs_cleanxattrs
Date: Fri, 27 Nov 2020 18:16:13 +0800	[thread overview]
Message-ID: <20201127101613.33435-1-huangjianan@oppo.com> (raw)

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


             reply	other threads:[~2020-11-27 10:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-27 10:16 Huang Jianan [this message]
2020-11-27 10:41 ` [PATCH] erofs-utils: use hash_for_each_safe in erofs_cleanxattrs Gao Xiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201127101613.33435-1-huangjianan@oppo.com \
    --to=huangjianan@oppo.com \
    --cc=guoweichao@oppo.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=liufeibao@oppo.com \
    --cc=zhangshiming@oppo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.