[PATCH] erofs-utils: use hash_for_each_safe in erofs_cleanxattrs
Huang Jianan
huangjianan at oppo.com
Fri Nov 27 21:16:13 AEDT 2020
Signed-off-by: Huang Jianan <huangjianan at oppo.com>
Signed-off-by: Guo Weichao <guoweichao at 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
More information about the Linux-erofs
mailing list