Lines Matching refs:snod

232 	struct ubifs_scan_node *snod, *tmp;
237 list_for_each_entry_safe(snod, tmp, &sleb->nodes, list) {
238 ubifs_assert(c, snod->type == UBIFS_INO_NODE ||
239 snod->type == UBIFS_DATA_NODE ||
240 snod->type == UBIFS_DENT_NODE ||
241 snod->type == UBIFS_XENT_NODE ||
242 snod->type == UBIFS_TRUN_NODE ||
243 snod->type == UBIFS_AUTH_NODE);
245 if (snod->type != UBIFS_INO_NODE &&
246 snod->type != UBIFS_DATA_NODE &&
247 snod->type != UBIFS_DENT_NODE &&
248 snod->type != UBIFS_XENT_NODE) {
250 list_del(&snod->list);
251 kfree(snod);
255 ubifs_assert(c, key_type(c, &snod->key) == UBIFS_DATA_KEY ||
256 key_type(c, &snod->key) == UBIFS_INO_KEY ||
257 key_type(c, &snod->key) == UBIFS_DENT_KEY ||
258 key_type(c, &snod->key) == UBIFS_XENT_KEY);
260 err = ubifs_tnc_has_node(c, &snod->key, 0, sleb->lnum,
261 snod->offs, 0);
267 list_del(&snod->list);
268 kfree(snod);
272 if (snod->len < *min)
273 *min = snod->len;
275 if (key_type(c, &snod->key) != UBIFS_DATA_KEY)
276 list_move_tail(&snod->list, nondata);
296 * @snod: the mode to move
299 * This function moves node @snod to @wbuf, changes TNC correspondingly, and
300 * destroys @snod. Returns zero in case of success and a negative error code in
304 struct ubifs_scan_node *snod, struct ubifs_wbuf *wbuf)
309 err = ubifs_wbuf_write_nolock(wbuf, snod->node, snod->len);
313 err = ubifs_tnc_replace(c, &snod->key, sleb->lnum,
314 snod->offs, new_lnum, new_offs,
315 snod->len);
316 list_del(&snod->list);
317 kfree(snod);
354 struct ubifs_scan_node *snod, *tmp;
357 list_for_each_entry_safe(snod, tmp, &sleb->nodes, list) {
360 if (snod->len > avail)
368 snod->node, snod->len);
372 err = move_node(c, sleb, snod, wbuf);
379 list_for_each_entry_safe(snod, tmp, &nondata, list) {
385 if (snod->len > avail) {
393 if (key_type(c, &snod->key) == UBIFS_DENT_KEY ||
394 snod->len == UBIFS_INO_NODE_SZ)
400 snod->node, snod->len);
404 err = move_node(c, sleb, snod, wbuf);
494 struct ubifs_scan_node *snod;
543 snod = list_entry(sleb->nodes.next, struct ubifs_scan_node, list);
545 if (snod->type == UBIFS_IDX_NODE) {
550 list_for_each_entry(snod, &sleb->nodes, list) {
551 struct ubifs_idx_node *idx = snod->node;
554 ubifs_assert(c, snod->type == UBIFS_IDX_NODE);
555 key_read(c, ubifs_idx_key(c, idx), &snod->key);
556 err = ubifs_dirty_idx_node(c, &snod->key, level, lnum,
557 snod->offs);