Skip to content

Commit

Permalink
erofs-utils: use hash_for_each_safe in erofs_cleanxattrs
Browse files Browse the repository at this point in the history
Signed-off-by: Huang Jianan <[email protected]>
Signed-off-by: Guo Weichao <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Gao Xiang <[email protected]>
Signed-off-by: Gao Xiang <[email protected]>
  • Loading branch information
hjn-1 authored and hsiangkao committed Nov 27, 2020
1 parent a2bb450 commit 326f5db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 326f5db

Please sign in to comment.