diff options
author | Huang Jianan <huangjianan@oppo.com> | 2020-11-27 18:16:13 +0800 |
---|---|---|
committer | Gao Xiang <hsiangkao@aol.com> | 2020-11-27 21:25:15 +0800 |
commit | 326f5dbf27614a0667763103647b11630e0fe922 (patch) | |
tree | 8b43a98f172eaa5372e1cf4e28d1648ea9b564c9 | |
parent | a2bb450f16f17669a30bf11671e475b81af9c67b (diff) | |
download | erofs-utils-326f5dbf27614a0667763103647b11630e0fe922.tar.gz |
erofs-utils: use hash_for_each_safe in erofs_cleanxattrs
Signed-off-by: Huang Jianan <huangjianan@oppo.com>
Signed-off-by: Guo Weichao <guoweichao@oppo.com>
Link: https://lore.kernel.org/r/20201127101613.33435-1-huangjianan@oppo.com
Reviewed-by: Gao Xiang <hsiangkao@redhat.com>
Signed-off-by: Gao Xiang <hsiangkao@aol.com>
-rw-r--r-- | lib/xattr.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |