Lines Matching refs:err
245 int err = 0; in do_write_orph_node() local
251 err = ubifs_leb_change(c, c->ohead_lnum, c->orph_buf, len, in do_write_orph_node()
256 err = ubifs_leb_unmap(c, c->ohead_lnum); in do_write_orph_node()
257 if (err) in do_write_orph_node()
258 return err; in do_write_orph_node()
260 err = ubifs_write_node(c, c->orph_buf, len, c->ohead_lnum, in do_write_orph_node()
263 return err; in do_write_orph_node()
279 int gap, err, len, cnt, i; in write_orph_node() local
322 err = do_write_orph_node(c, len, atomic); in write_orph_node()
325 return err; in write_orph_node()
338 int err; in write_orph_nodes() local
341 err = write_orph_node(c, atomic); in write_orph_nodes()
342 if (err) in write_orph_nodes()
343 return err; in write_orph_nodes()
351 err = ubifs_leb_unmap(c, lnum); in write_orph_nodes()
352 if (err) in write_orph_nodes()
353 return err; in write_orph_nodes()
372 int tot_avail = tot_avail_orphs(c), err = 0; in consolidate() local
401 err = -EINVAL; in consolidate()
404 return err; in consolidate()
416 int avail, atomic = 0, err; in commit_orphans() local
422 err = consolidate(c); in commit_orphans()
423 if (err) in commit_orphans()
424 return err; in commit_orphans()
427 err = write_orph_nodes(c, atomic); in commit_orphans()
428 return err; in commit_orphans()
468 int err; in ubifs_orphan_end_commit() local
471 err = commit_orphans(c); in ubifs_orphan_end_commit()
472 if (err) in ubifs_orphan_end_commit()
473 return err; in ubifs_orphan_end_commit()
476 err = dbg_check_orphans(c); in ubifs_orphan_end_commit()
477 return err; in ubifs_orphan_end_commit()
490 int lnum, err; in ubifs_clear_orphans() local
493 err = ubifs_leb_unmap(c, lnum); in ubifs_clear_orphans()
494 if (err) in ubifs_clear_orphans()
495 return err; in ubifs_clear_orphans()
566 int i, n, err, first = 1; in do_kill_orphans() local
616 err = ubifs_tnc_remove_ino(c, inum); in do_kill_orphans()
617 if (err) in do_kill_orphans()
618 return err; in do_kill_orphans()
619 err = insert_dead_orphan(c, inum); in do_kill_orphans()
620 if (err) in do_kill_orphans()
621 return err; in do_kill_orphans()
649 int lnum, err = 0, outofdate = 0, last_flagged = 0; in kill_orphans() local
677 err = PTR_ERR(sleb); in kill_orphans()
681 err = do_kill_orphans(c, sleb, &last_cmt_no, &outofdate, in kill_orphans()
683 if (err || outofdate) { in kill_orphans()
693 return err; in kill_orphans()
708 int err = 0; in ubifs_mount_orphans() local
719 err = kill_orphans(c); in ubifs_mount_orphans()
721 err = ubifs_clear_orphans(c); in ubifs_mount_orphans()
723 return err; in ubifs_mount_orphans()
840 int err; in dbg_orphan_check() local
850 err = ubifs_tnc_read_node(c, zbr, ci->node); in dbg_orphan_check()
851 if (err) { in dbg_orphan_check()
852 ubifs_err("node read failed, error %d", err); in dbg_orphan_check()
853 return err; in dbg_orphan_check()
873 int i, n, err; in dbg_read_orphans() local
883 err = dbg_ins_check_orphan(&ci->root, inum); in dbg_read_orphans()
884 if (err) in dbg_read_orphans()
885 return err; in dbg_read_orphans()
893 int lnum, err = 0; in dbg_scan_orphans() local
904 err = PTR_ERR(sleb); in dbg_scan_orphans()
908 err = dbg_read_orphans(ci, sleb); in dbg_scan_orphans()
910 if (err) in dbg_scan_orphans()
914 return err; in dbg_scan_orphans()
920 int err; in dbg_check_orphans() local
936 err = dbg_scan_orphans(c, &ci); in dbg_check_orphans()
937 if (err) in dbg_check_orphans()
940 err = dbg_walk_index(c, &dbg_orphan_check, NULL, &ci); in dbg_check_orphans()
941 if (err) { in dbg_check_orphans()
942 ubifs_err("cannot scan TNC, error %d", err); in dbg_check_orphans()
948 err = -EINVAL; in dbg_check_orphans()
959 return err; in dbg_check_orphans()