local_t: Remove leftover local.h
[safe/jmp/linux-2.6] / fs / ubifs / commit.c
index 3b51631..4775af4 100644 (file)
@@ -74,6 +74,7 @@ static int do_commit(struct ubifs_info *c)
                        goto out_up;
        }
 
+       c->cmt_no += 1;
        err = ubifs_gc_start_commit(c);
        if (err)
                goto out_up;
@@ -115,7 +116,7 @@ static int do_commit(struct ubifs_info *c)
                goto out;
 
        mutex_lock(&c->mst_mutex);
-       c->mst_node->cmt_no      = cpu_to_le64(++c->cmt_no);
+       c->mst_node->cmt_no      = cpu_to_le64(c->cmt_no);
        c->mst_node->log_lnum    = cpu_to_le32(new_ltail_lnum);
        c->mst_node->root_lnum   = cpu_to_le32(zroot.lnum);
        c->mst_node->root_offs   = cpu_to_le32(zroot.offs);
@@ -233,8 +234,8 @@ int ubifs_bg_thread(void *info)
        int err;
        struct ubifs_info *c = info;
 
-       ubifs_msg("background thread \"%s\" started, PID %d",
-                 c->bgt_name, current->pid);
+       dbg_msg("background thread \"%s\" started, PID %d",
+               c->bgt_name, current->pid);
        set_freezable();
 
        while (1) {
@@ -469,12 +470,12 @@ int dbg_old_index_check_init(struct ubifs_info *c, struct ubifs_zbranch *zroot)
 {
        struct ubifs_idx_node *idx;
        int lnum, offs, len, err = 0;
+       struct ubifs_debug_info *d = c->dbg;
 
-       c->old_zroot = *zroot;
-
-       lnum = c->old_zroot.lnum;
-       offs = c->old_zroot.offs;
-       len = c->old_zroot.len;
+       d->old_zroot = *zroot;
+       lnum = d->old_zroot.lnum;
+       offs = d->old_zroot.offs;
+       len = d->old_zroot.len;
 
        idx = kmalloc(c->max_idx_node_sz, GFP_NOFS);
        if (!idx)
@@ -484,8 +485,8 @@ int dbg_old_index_check_init(struct ubifs_info *c, struct ubifs_zbranch *zroot)
        if (err)
                goto out;
 
-       c->old_zroot_level = le16_to_cpu(idx->level);
-       c->old_zroot_sqnum = le64_to_cpu(idx->ch.sqnum);
+       d->old_zroot_level = le16_to_cpu(idx->level);
+       d->old_zroot_sqnum = le64_to_cpu(idx->ch.sqnum);
 out:
        kfree(idx);
        return err;
@@ -508,7 +509,8 @@ int dbg_check_old_index(struct ubifs_info *c, struct ubifs_zbranch *zroot)
 {
        int lnum, offs, len, err = 0, uninitialized_var(last_level), child_cnt;
        int first = 1, iip;
-       union ubifs_key lower_key, upper_key, l_key, u_key;
+       struct ubifs_debug_info *d = c->dbg;
+       union ubifs_key uninitialized_var(lower_key), upper_key, l_key, u_key;
        unsigned long long uninitialized_var(last_sqnum);
        struct ubifs_idx_node *idx;
        struct list_head list;
@@ -524,9 +526,9 @@ int dbg_check_old_index(struct ubifs_info *c, struct ubifs_zbranch *zroot)
             UBIFS_IDX_NODE_SZ;
 
        /* Start at the old zroot */
-       lnum = c->old_zroot.lnum;
-       offs = c->old_zroot.offs;
-       len = c->old_zroot.len;
+       lnum = d->old_zroot.lnum;
+       offs = d->old_zroot.offs;
+       len = d->old_zroot.len;
        iip = 0;
 
        /*
@@ -559,11 +561,11 @@ int dbg_check_old_index(struct ubifs_info *c, struct ubifs_zbranch *zroot)
                if (first) {
                        first = 0;
                        /* Check root level and sqnum */
-                       if (le16_to_cpu(idx->level) != c->old_zroot_level) {
+                       if (le16_to_cpu(idx->level) != d->old_zroot_level) {
                                err = 2;
                                goto out_dump;
                        }
-                       if (le64_to_cpu(idx->ch.sqnum) != c->old_zroot_sqnum) {
+                       if (le64_to_cpu(idx->ch.sqnum) != d->old_zroot_sqnum) {
                                err = 3;
                                goto out_dump;
                        }