Lines Matching +full:0 +full:xd
32 * is_xattr_datum_unchecked(c, xd)
34 * unchecked, it returns 0.
35 * unload_xattr_datum(c, xd)
41 * do_verify_xattr_datum(c, xd)
45 * 0 will be returned, if success. An negative return value means recoverable error, and
48 * do_load_xattr_datum(c, xd)
51 * load_xattr_datum(c, xd)
53 * If xd need to call do_verify_xattr_datum() at first, it's called before calling
55 * save_xattr_datum(c, xd)
56 * is used to write xdatum to medium. xd->version will be incremented.
59 * unrefer_xattr_datum(c, xd)
61 * is set on xd->flags and chained xattr_dead_list or release it immediately.
71 static int is_xattr_datum_unchecked(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd) in is_xattr_datum_unchecked() argument
74 int rc = 0; in is_xattr_datum_unchecked()
77 for (raw=xd->node; raw != (void *)xd; raw=raw->next_in_ino) { in is_xattr_datum_unchecked()
87 static void unload_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd) in unload_xattr_datum() argument
90 D1(dbg_xattr("%s: xid=%u, version=%u\n", __func__, xd->xid, xd->version)); in unload_xattr_datum()
91 if (xd->xname) { in unload_xattr_datum()
92 c->xdatum_mem_usage -= (xd->name_len + 1 + xd->value_len); in unload_xattr_datum()
93 kfree(xd->xname); in unload_xattr_datum()
96 list_del_init(&xd->xindex); in unload_xattr_datum()
97 xd->hashkey = 0; in unload_xattr_datum()
98 xd->xname = NULL; in unload_xattr_datum()
99 xd->xvalue = NULL; in unload_xattr_datum()
105 struct jffs2_xattr_datum *xd, *_xd; in reclaim_xattr_datum() local
107 static int index = 0; in reclaim_xattr_datum()
115 for (count = 0; count < XATTRINDEX_HASHSIZE; count++) { in reclaim_xattr_datum()
116 list_for_each_entry_safe(xd, _xd, &c->xattrindex[index], xindex) { in reclaim_xattr_datum()
117 if (xd->flags & JFFS2_XFLAGS_HOT) { in reclaim_xattr_datum()
118 xd->flags &= ~JFFS2_XFLAGS_HOT; in reclaim_xattr_datum()
119 } else if (!(xd->flags & JFFS2_XFLAGS_BIND)) { in reclaim_xattr_datum()
120 unload_xattr_datum(c, xd); in reclaim_xattr_datum()
132 static int do_verify_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd) in do_verify_xattr_datum() argument
143 offset = ref_offset(xd->node); in do_verify_xattr_datum()
144 if (ref_flags(xd->node) == REF_PRISTINE) in do_verify_xattr_datum()
154 crc = crc32(0, &rx, sizeof(rx) - 4); in do_verify_xattr_datum()
158 xd->flags |= JFFS2_XFLAGS_INVALID; in do_verify_xattr_datum()
165 || je32_to_cpu(rx.xid) != xd->xid in do_verify_xattr_datum()
166 || je32_to_cpu(rx.version) != xd->version) { in do_verify_xattr_datum()
172 je32_to_cpu(rx.xid), xd->xid, in do_verify_xattr_datum()
173 je32_to_cpu(rx.version), xd->version); in do_verify_xattr_datum()
174 xd->flags |= JFFS2_XFLAGS_INVALID; in do_verify_xattr_datum()
177 xd->xprefix = rx.xprefix; in do_verify_xattr_datum()
178 xd->name_len = rx.name_len; in do_verify_xattr_datum()
179 xd->value_len = je16_to_cpu(rx.value_len); in do_verify_xattr_datum()
180 xd->data_crc = je32_to_cpu(rx.data_crc); in do_verify_xattr_datum()
184 for (raw=xd->node; raw != (void *)xd; raw=raw->next_in_ino) { in do_verify_xattr_datum()
191 raw->flash_offset = ref_offset(raw) | ((xd->node==raw) ? REF_PRISTINE : REF_NORMAL); in do_verify_xattr_datum()
196 list_del_init(&xd->xindex); in do_verify_xattr_datum()
199 xd->xid, xd->version); in do_verify_xattr_datum()
201 return 0; in do_verify_xattr_datum()
204 static int do_load_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd) in do_load_xattr_datum() argument
210 int i, ret, retry = 0; in do_load_xattr_datum()
212 BUG_ON(ref_flags(xd->node) != REF_PRISTINE); in do_load_xattr_datum()
213 BUG_ON(!list_empty(&xd->xindex)); in do_load_xattr_datum()
215 length = xd->name_len + 1 + xd->value_len; in do_load_xattr_datum()
220 ret = jffs2_flash_read(c, ref_offset(xd->node)+sizeof(struct jffs2_raw_xattr), in do_load_xattr_datum()
225 ret, length, readlen, ref_offset(xd->node)); in do_load_xattr_datum()
230 data[xd->name_len] = '\0'; in do_load_xattr_datum()
231 crc = crc32(0, data, length); in do_load_xattr_datum()
232 if (crc != xd->data_crc) { in do_load_xattr_datum()
234 " at %#08x, read: 0x%08x calculated: 0x%08x\n", in do_load_xattr_datum()
235 ref_offset(xd->node), xd->data_crc, crc); in do_load_xattr_datum()
237 xd->flags |= JFFS2_XFLAGS_INVALID; in do_load_xattr_datum()
241 xd->flags |= JFFS2_XFLAGS_HOT; in do_load_xattr_datum()
242 xd->xname = data; in do_load_xattr_datum()
243 xd->xvalue = data + xd->name_len+1; in do_load_xattr_datum()
247 xd->hashkey = xattr_datum_hashkey(xd->xprefix, xd->xname, xd->xvalue, xd->value_len); in do_load_xattr_datum()
248 i = xd->hashkey % XATTRINDEX_HASHSIZE; in do_load_xattr_datum()
249 list_add(&xd->xindex, &c->xattrindex[i]); in do_load_xattr_datum()
253 if (!xd->xname) in do_load_xattr_datum()
258 xd->xid, xd->xprefix, xd->xname); in do_load_xattr_datum()
260 return 0; in do_load_xattr_datum()
263 static int load_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd) in load_xattr_datum() argument
266 * rc < 0 : recoverable error, try again in load_xattr_datum()
267 * rc = 0 : success in load_xattr_datum()
268 * rc > 0 : Unrecoverable error, this node should be deleted. in load_xattr_datum()
270 int rc = 0; in load_xattr_datum()
272 BUG_ON(xd->flags & JFFS2_XFLAGS_DEAD); in load_xattr_datum()
273 if (xd->xname) in load_xattr_datum()
274 return 0; in load_xattr_datum()
275 if (xd->flags & JFFS2_XFLAGS_INVALID) in load_xattr_datum()
277 if (unlikely(is_xattr_datum_unchecked(c, xd))) in load_xattr_datum()
278 rc = do_verify_xattr_datum(c, xd); in load_xattr_datum()
280 rc = do_load_xattr_datum(c, xd); in load_xattr_datum()
284 static int save_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd) in save_xattr_datum() argument
293 BUG_ON(!xd->xname); in save_xattr_datum()
294 BUG_ON(xd->flags & (JFFS2_XFLAGS_DEAD|JFFS2_XFLAGS_INVALID)); in save_xattr_datum()
296 vecs[0].iov_base = ℞ in save_xattr_datum()
297 vecs[0].iov_len = sizeof(rx); in save_xattr_datum()
298 vecs[1].iov_base = xd->xname; in save_xattr_datum()
299 vecs[1].iov_len = xd->name_len + 1 + xd->value_len; in save_xattr_datum()
300 totlen = vecs[0].iov_len + vecs[1].iov_len; in save_xattr_datum()
303 memset(&rx, 0, sizeof(rx)); in save_xattr_datum()
307 rx.hdr_crc = cpu_to_je32(crc32(0, &rx, sizeof(struct jffs2_unknown_node) - 4)); in save_xattr_datum()
309 rx.xid = cpu_to_je32(xd->xid); in save_xattr_datum()
310 rx.version = cpu_to_je32(++xd->version); in save_xattr_datum()
311 rx.xprefix = xd->xprefix; in save_xattr_datum()
312 rx.name_len = xd->name_len; in save_xattr_datum()
313 rx.value_len = cpu_to_je16(xd->value_len); in save_xattr_datum()
314 rx.data_crc = cpu_to_je32(crc32(0, vecs[1].iov_base, vecs[1].iov_len)); in save_xattr_datum()
315 rx.node_crc = cpu_to_je32(crc32(0, &rx, sizeof(struct jffs2_raw_xattr) - 4)); in save_xattr_datum()
317 rc = jffs2_flash_writev(c, vecs, 2, phys_ofs, &length, 0); in save_xattr_datum()
328 jffs2_add_physical_node_ref(c, phys_ofs | REF_PRISTINE, PAD(totlen), (void *)xd); in save_xattr_datum()
331 xd->xid, xd->version, xd->xprefix, xd->xname); in save_xattr_datum()
333 return 0; in save_xattr_datum()
341 struct jffs2_xattr_datum *xd; in create_xattr_datum() local
349 list_for_each_entry(xd, &c->xattrindex[i], xindex) { in create_xattr_datum()
350 if (xd->hashkey==hashkey in create_xattr_datum()
351 && xd->xprefix==xprefix in create_xattr_datum()
352 && xd->value_len==xsize in create_xattr_datum()
353 && !strcmp(xd->xname, xname) in create_xattr_datum()
354 && !memcmp(xd->xvalue, xvalue, xsize)) { in create_xattr_datum()
355 atomic_inc(&xd->refcnt); in create_xattr_datum()
356 return xd; in create_xattr_datum()
363 xd = jffs2_alloc_xattr_datum(); in create_xattr_datum()
364 if (!xd) in create_xattr_datum()
369 jffs2_free_xattr_datum(xd); in create_xattr_datum()
375 atomic_set(&xd->refcnt, 1); in create_xattr_datum()
376 xd->xid = ++c->highest_xid; in create_xattr_datum()
377 xd->flags |= JFFS2_XFLAGS_HOT; in create_xattr_datum()
378 xd->xprefix = xprefix; in create_xattr_datum()
380 xd->hashkey = hashkey; in create_xattr_datum()
381 xd->xname = data; in create_xattr_datum()
382 xd->xvalue = data + name_len + 1; in create_xattr_datum()
383 xd->name_len = name_len; in create_xattr_datum()
384 xd->value_len = xsize; in create_xattr_datum()
385 xd->data_crc = crc32(0, data, xd->name_len + 1 + xd->value_len); in create_xattr_datum()
387 rc = save_xattr_datum(c, xd); in create_xattr_datum()
389 kfree(xd->xname); in create_xattr_datum()
390 jffs2_free_xattr_datum(xd); in create_xattr_datum()
396 list_add(&xd->xindex, &c->xattrindex[i]); in create_xattr_datum()
398 c->xdatum_mem_usage += (xd->name_len + 1 + xd->value_len); in create_xattr_datum()
401 return xd; in create_xattr_datum()
404 static void unrefer_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd) in unrefer_xattr_datum() argument
407 if (atomic_dec_and_lock(&xd->refcnt, &c->erase_completion_lock)) { in unrefer_xattr_datum()
408 unload_xattr_datum(c, xd); in unrefer_xattr_datum()
409 xd->flags |= JFFS2_XFLAGS_DEAD; in unrefer_xattr_datum()
410 if (xd->node == (void *)xd) { in unrefer_xattr_datum()
411 BUG_ON(!(xd->flags & JFFS2_XFLAGS_INVALID)); in unrefer_xattr_datum()
412 jffs2_free_xattr_datum(xd); in unrefer_xattr_datum()
414 list_add(&xd->xindex, &c->xattr_dead_list); in unrefer_xattr_datum()
419 xd->xid, xd->version); in unrefer_xattr_datum()
430 * create_xattr_ref(c, ic, xd)
466 crc = crc32(0, &rr, sizeof(rr) - 4); in verify_xattr_ref()
503 return 0; in verify_xattr_ref()
517 rr.hdr_crc = cpu_to_je32(crc32(0, &rr, sizeof(struct jffs2_unknown_node) - 4)); in save_xattr_ref()
526 rr.xid = cpu_to_je32(ref->xd->xid); in save_xattr_ref()
529 rr.node_crc = cpu_to_je32(crc32(0, &rr, sizeof(rr) - 4)); in save_xattr_ref()
545 dbg_xattr("success on saving xref (ino=%u, xid=%u)\n", ref->ic->ino, ref->xd->xid); in save_xattr_ref()
547 return 0; in save_xattr_ref()
551 struct jffs2_xattr_datum *xd) in create_xattr_ref() argument
561 ref->xd = xd; in create_xattr_ref()
579 struct jffs2_xattr_datum *xd; in delete_xattr_ref() local
581 xd = ref->xd; in delete_xattr_ref()
584 ref->xid = ref->xd->xid; in delete_xattr_ref()
593 unrefer_xattr_datum(c, xd); in delete_xattr_ref()
602 if (!ic || ic->pino_nlink > 0) in jffs2_xattr_delete_inode()
617 struct jffs2_xattr_datum *xd; in jffs2_xattr_free_inode() local
623 xd = ref->xd; in jffs2_xattr_free_inode()
624 if (atomic_dec_and_test(&xd->refcnt)) { in jffs2_xattr_free_inode()
625 unload_xattr_datum(c, xd); in jffs2_xattr_free_inode()
626 jffs2_free_xattr_datum(xd); in jffs2_xattr_free_inode()
641 int rc = 0; in check_xattr_ref_inode()
644 return 0; in check_xattr_ref_inode()
647 rc = 0; in check_xattr_ref_inode()
649 if (!ref->xd->xname) { in check_xattr_ref_inode()
650 rc = load_xattr_datum(c, ref->xd); in check_xattr_ref_inode()
651 if (unlikely(rc > 0)) { in check_xattr_ref_inode()
655 } else if (unlikely(rc < 0)) in check_xattr_ref_inode()
659 if (!cmp->xd->xname) { in check_xattr_ref_inode()
660 ref->xd->flags |= JFFS2_XFLAGS_BIND; in check_xattr_ref_inode()
661 rc = load_xattr_datum(c, cmp->xd); in check_xattr_ref_inode()
662 ref->xd->flags &= ~JFFS2_XFLAGS_BIND; in check_xattr_ref_inode()
663 if (unlikely(rc > 0)) { in check_xattr_ref_inode()
667 } else if (unlikely(rc < 0)) in check_xattr_ref_inode()
670 if (ref->xd->xprefix == cmp->xd->xprefix in check_xattr_ref_inode()
671 && !strcmp(ref->xd->xname, cmp->xd->xname)) { in check_xattr_ref_inode()
711 for (i=0; i < XATTRINDEX_HASHSIZE; i++) in jffs2_init_xattr_subsystem()
719 c->highest_xid = 0; in jffs2_init_xattr_subsystem()
720 c->highest_xseqno = 0; in jffs2_init_xattr_subsystem()
721 c->xdatum_mem_usage = 0; in jffs2_init_xattr_subsystem()
727 struct jffs2_xattr_datum *xd; in jffs2_find_xattr_datum() local
733 list_for_each_entry(xd, &c->xattrindex[i], xindex) { in jffs2_find_xattr_datum()
734 if (xd->xid==xid) in jffs2_find_xattr_datum()
735 return xd; in jffs2_find_xattr_datum()
742 struct jffs2_xattr_datum *xd, *_xd; in jffs2_clear_xattr_subsystem() local
756 for (i=0; i < XATTRINDEX_HASHSIZE; i++) { in jffs2_clear_xattr_subsystem()
757 list_for_each_entry_safe(xd, _xd, &c->xattrindex[i], xindex) { in jffs2_clear_xattr_subsystem()
758 list_del(&xd->xindex); in jffs2_clear_xattr_subsystem()
759 kfree(xd->xname); in jffs2_clear_xattr_subsystem()
760 jffs2_free_xattr_datum(xd); in jffs2_clear_xattr_subsystem()
764 list_for_each_entry_safe(xd, _xd, &c->xattr_dead_list, xindex) { in jffs2_clear_xattr_subsystem()
765 list_del(&xd->xindex); in jffs2_clear_xattr_subsystem()
766 jffs2_free_xattr_datum(xd); in jffs2_clear_xattr_subsystem()
768 list_for_each_entry_safe(xd, _xd, &c->xattr_unchecked, xindex) { in jffs2_clear_xattr_subsystem()
769 list_del(&xd->xindex); in jffs2_clear_xattr_subsystem()
770 jffs2_free_xattr_datum(xd); in jffs2_clear_xattr_subsystem()
779 struct jffs2_xattr_datum *xd, *_xd; in jffs2_build_xattr_subsystem() local
782 int i, xdatum_count = 0, xdatum_unchecked_count = 0, xref_count = 0; in jffs2_build_xattr_subsystem()
783 int xdatum_orphan_count = 0, xref_orphan_count = 0, xref_dead_count = 0; in jffs2_build_xattr_subsystem()
788 for (i=0; i < XREF_TMPHASH_SIZE; i++) in jffs2_build_xattr_subsystem()
829 for (i=0; i < XREF_TMPHASH_SIZE; i++) { in jffs2_build_xattr_subsystem()
840 ref->xd and ref->ic are not valid yet. */ in jffs2_build_xattr_subsystem()
841 xd = jffs2_find_xattr_datum(c, ref->xid); in jffs2_build_xattr_subsystem()
843 if (!xd || !ic || !ic->pino_nlink) { in jffs2_build_xattr_subsystem()
852 ref->xd = xd; in jffs2_build_xattr_subsystem()
854 atomic_inc(&xd->refcnt); in jffs2_build_xattr_subsystem()
861 for (i=0; i < XATTRINDEX_HASHSIZE; i++) { in jffs2_build_xattr_subsystem()
862 list_for_each_entry_safe(xd, _xd, &c->xattrindex[i], xindex) { in jffs2_build_xattr_subsystem()
864 list_del_init(&xd->xindex); in jffs2_build_xattr_subsystem()
865 if (!atomic_read(&xd->refcnt)) { in jffs2_build_xattr_subsystem()
867 xd->xid, xd->version); in jffs2_build_xattr_subsystem()
868 xd->flags |= JFFS2_XFLAGS_DEAD; in jffs2_build_xattr_subsystem()
869 list_add(&xd->xindex, &c->xattr_unchecked); in jffs2_build_xattr_subsystem()
873 if (is_xattr_datum_unchecked(c, xd)) { in jffs2_build_xattr_subsystem()
875 xd->xid, xd->version); in jffs2_build_xattr_subsystem()
876 list_add(&xd->xindex, &c->xattr_unchecked); in jffs2_build_xattr_subsystem()
892 struct jffs2_xattr_datum *xd; in jffs2_setup_xattr_datum() local
894 xd = jffs2_find_xattr_datum(c, xid); in jffs2_setup_xattr_datum()
895 if (!xd) { in jffs2_setup_xattr_datum()
896 xd = jffs2_alloc_xattr_datum(); in jffs2_setup_xattr_datum()
897 if (!xd) in jffs2_setup_xattr_datum()
899 xd->xid = xid; in jffs2_setup_xattr_datum()
900 xd->version = version; in jffs2_setup_xattr_datum()
901 if (xd->xid > c->highest_xid) in jffs2_setup_xattr_datum()
902 c->highest_xid = xd->xid; in jffs2_setup_xattr_datum()
903 list_add_tail(&xd->xindex, &c->xattrindex[xid % XATTRINDEX_HASHSIZE]); in jffs2_setup_xattr_datum()
905 return xd; in jffs2_setup_xattr_datum()
968 struct jffs2_xattr_datum *xd; in jffs2_listxattr() local
972 int retry = 0; in jffs2_listxattr()
980 len = 0; in jffs2_listxattr()
983 xd = ref->xd; in jffs2_listxattr()
984 if (!xd->xname) { in jffs2_listxattr()
992 rc = load_xattr_datum(c, xd); in jffs2_listxattr()
993 if (unlikely(rc > 0)) { in jffs2_listxattr()
997 } else if (unlikely(rc < 0)) in jffs2_listxattr()
1001 xhandle = xprefix_to_handler(xd->xprefix); in jffs2_listxattr()
1006 rc = prefix_len + xd->name_len + 1; in jffs2_listxattr()
1015 memcpy(buffer, xd->xname, xd->name_len); in jffs2_listxattr()
1016 buffer += xd->name_len; in jffs2_listxattr()
1017 *buffer++ = 0; in jffs2_listxattr()
1037 struct jffs2_xattr_datum *xd; in do_jffs2_getxattr() local
1039 int rc, retry = 0; in do_jffs2_getxattr()
1050 xd = ref->xd; in do_jffs2_getxattr()
1051 if (xd->xprefix != xprefix) in do_jffs2_getxattr()
1053 if (!xd->xname) { in do_jffs2_getxattr()
1061 rc = load_xattr_datum(c, xd); in do_jffs2_getxattr()
1062 if (unlikely(rc > 0)) { in do_jffs2_getxattr()
1066 } else if (unlikely(rc < 0)) { in do_jffs2_getxattr()
1071 if (!strcmp(xname, xd->xname)) { in do_jffs2_getxattr()
1072 rc = xd->value_len; in do_jffs2_getxattr()
1077 memcpy(buffer, xd->xvalue, rc); in do_jffs2_getxattr()
1099 struct jffs2_xattr_datum *xd; in do_jffs2_setxattr() local
1120 xd = ref->xd; in do_jffs2_setxattr()
1121 if (xd->xprefix != xprefix) in do_jffs2_setxattr()
1123 if (!xd->xname) { in do_jffs2_setxattr()
1124 rc = load_xattr_datum(c, xd); in do_jffs2_setxattr()
1125 if (unlikely(rc > 0)) { in do_jffs2_setxattr()
1129 } else if (unlikely(rc < 0)) in do_jffs2_setxattr()
1132 if (!strcmp(xd->xname, xname)) { in do_jffs2_setxattr()
1139 ref->xid = xd->xid; in do_jffs2_setxattr()
1148 unrefer_xattr_datum(c, xd); in do_jffs2_setxattr()
1151 ref->xd = xd; in do_jffs2_setxattr()
1169 xd = create_xattr_datum(c, xprefix, xname, buffer, size); in do_jffs2_setxattr()
1170 if (IS_ERR(xd)) { in do_jffs2_setxattr()
1171 rc = PTR_ERR(xd); in do_jffs2_setxattr()
1184 unrefer_xattr_datum(c, xd); in do_jffs2_setxattr()
1190 newref = create_xattr_ref(c, ic, xd); in do_jffs2_setxattr()
1197 unrefer_xattr_datum(c, xd); in do_jffs2_setxattr()
1208 * jffs2_garbage_collect_xattr_datum(c, xd, raw)
1214 * jffs2_release_xattr_datum(c, xd)
1219 int jffs2_garbage_collect_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd, in jffs2_garbage_collect_xattr_datum() argument
1223 int rc = 0; in jffs2_garbage_collect_xattr_datum()
1226 if (xd->node != raw) in jffs2_garbage_collect_xattr_datum()
1228 if (xd->flags & (JFFS2_XFLAGS_DEAD|JFFS2_XFLAGS_INVALID)) in jffs2_garbage_collect_xattr_datum()
1231 rc = load_xattr_datum(c, xd); in jffs2_garbage_collect_xattr_datum()
1233 rc = (rc > 0) ? 0 : rc; in jffs2_garbage_collect_xattr_datum()
1236 old_ofs = ref_offset(xd->node); in jffs2_garbage_collect_xattr_datum()
1238 + xd->name_len + 1 + xd->value_len); in jffs2_garbage_collect_xattr_datum()
1244 rc = save_xattr_datum(c, xd); in jffs2_garbage_collect_xattr_datum()
1247 xd->xid, xd->version, old_ofs, ref_offset(xd->node)); in jffs2_garbage_collect_xattr_datum()
1259 int rc = 0; in jffs2_garbage_collect_xattr_ref()
1281 ref->ic->ino, ref->xd->xid, old_ofs, ref_offset(ref->node)); in jffs2_garbage_collect_xattr_ref()
1291 struct jffs2_xattr_datum *xd, *_xd; in jffs2_verify_xattr() local
1298 list_for_each_entry_safe(xd, _xd, &c->xattr_unchecked, xindex) { in jffs2_verify_xattr()
1299 rc = do_verify_xattr_datum(c, xd); in jffs2_verify_xattr()
1300 if (rc < 0) in jffs2_verify_xattr()
1302 list_del_init(&xd->xindex); in jffs2_verify_xattr()
1304 for (raw=xd->node; raw != (void *)xd; raw=raw->next_in_ino) { in jffs2_verify_xattr()
1312 | ((xd->node == (void *)raw) ? REF_PRISTINE : REF_NORMAL); in jffs2_verify_xattr()
1314 if (xd->flags & JFFS2_XFLAGS_DEAD) in jffs2_verify_xattr()
1315 list_add(&xd->xindex, &c->xattr_dead_list); in jffs2_verify_xattr()
1319 return list_empty(&c->xattr_unchecked) ? 1 : 0; in jffs2_verify_xattr()
1322 void jffs2_release_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum *xd) in jffs2_release_xattr_datum() argument
1325 if (atomic_read(&xd->refcnt) || xd->node != (void *)xd) in jffs2_release_xattr_datum()
1328 list_del(&xd->xindex); in jffs2_release_xattr_datum()
1329 jffs2_free_xattr_datum(xd); in jffs2_release_xattr_datum()