48 #include <linux/slab.h>
81 if (c->
zroot.znode && ubifs_zn_dirty(c->
zroot.znode))
111 int err, new_ltail_lnum, old_ltail_lnum,
i;
123 if (nothing_to_commit(c)) {
131 err = ubifs_wbuf_sync(&c->
jheads[i].wbuf);
232 ubifs_err(
"commit failed, error %d", err);
248 static int run_bg_commit(
struct ubifs_info *c)
296 ubifs_msg(
"background thread \"%s\" started, PID %d",
380 ubifs_wake_up_bgt(c);
391 static int wait_for_commit(
struct ubifs_info *c)
434 return wait_for_commit(c);
457 return wait_for_commit(c);
489 dbg_cmt(
"commit required now");
492 dbg_cmt(
"commit not requested");
574 union ubifs_key uninitialized_var(lower_key), upper_key, l_key, u_key;
581 if (!dbg_is_chk_index(c))
584 INIT_LIST_HEAD(&list);
586 sz =
sizeof(
struct idx_node) + ubifs_idx_node_sz(c, c->fanout) -
618 if (child_cnt < 1 || child_cnt > c->fanout) {
636 key_read(c, ubifs_idx_key(c, idx), &lower_key);
653 key_read(c, ubifs_idx_key(c, idx), &l_key);
654 br = ubifs_idx_branch(c, idx, child_cnt - 1);
655 key_read(c, &br->
key, &u_key);
656 if (keys_cmp(c, &lower_key, &l_key) > 0) {
660 if (keys_cmp(c, &upper_key, &u_key) < 0) {
664 if (keys_cmp(c, &upper_key, &u_key) == 0)
665 if (!is_hash_key(c, &u_key)) {
677 if (list_empty(&list))
700 br = ubifs_idx_branch(c, idx, iip);
704 key_read(c, &br->
key, &lower_key);
706 br = ubifs_idx_branch(c, idx, iip + 1);
707 key_read(c, &br->
key, &upper_key);
723 if (!list_empty(&list)) {
729 while (!list_empty(&list)) {