FIX: no entries found during iteration.
authorngkaho1234 <ngkaho1234@gmail.com>
Wed, 7 Oct 2015 15:47:43 +0000 (15:47 +0000)
committerngkaho1234 <ngkaho1234@gmail.com>
Wed, 7 Oct 2015 15:47:43 +0000 (15:47 +0000)
lwext4/ext4_xattr.c

index 2c252bb6432332eaa92df6b4b80cb395d9b4534a..a38cc321409c8b3b87309e3e5ff939093810e1e3 100644 (file)
@@ -737,9 +737,9 @@ ext4_fs_xattr_iterate(struct ext4_xattr_ref *ref,
                      int (iter)(struct ext4_xattr_ref *ref,
                                 struct ext4_xattr_item *item))
 {
-       struct ext4_xattr_item *item = ref->iter_from;
-       if (!item)
-               item = RB_MIN(ext4_xattr_tree, &ref->root);
+       struct ext4_xattr_item *item;
+       if (!ref->iter_from)
+               ref->iter_from = RB_MIN(ext4_xattr_tree, &ref->root);
 
        RB_FOREACH_FROM(item,
                        ext4_xattr_tree,