UBIFS: endian handling fixes and annotations
[safe/jmp/linux-2.6] / fs / ubifs / super.c
index 7e1f3ef..8780efb 100644 (file)
@@ -420,21 +420,22 @@ static int ubifs_sync_fs(struct super_block *sb, int wait)
        int i, ret = 0, err;
        long long bud_bytes;
 
-       if (c->jheads)
+       if (c->jheads) {
                for (i = 0; i < c->jhead_cnt; i++) {
                        err = ubifs_wbuf_sync(&c->jheads[i].wbuf);
                        if (err && !ret)
                                ret = err;
                }
 
-       /* Commit the journal unless it has too few data */
-       spin_lock(&c->buds_lock);
-       bud_bytes = c->bud_bytes;
-       spin_unlock(&c->buds_lock);
-       if (bud_bytes > c->leb_size) {
-               err = ubifs_run_commit(c);
-               if (err)
-                       return err;
+               /* Commit the journal unless it has too little data */
+               spin_lock(&c->buds_lock);
+               bud_bytes = c->bud_bytes;
+               spin_unlock(&c->buds_lock);
+               if (bud_bytes > c->leb_size) {
+                       err = ubifs_run_commit(c);
+                       if (err)
+                               return err;
+               }
        }
 
        /*
@@ -890,7 +891,7 @@ enum {
        Opt_err,
 };
 
-static match_table_t tokens = {
+static const match_table_t tokens = {
        {Opt_fast_unmount, "fast_unmount"},
        {Opt_norm_unmount, "norm_unmount"},
        {Opt_bulk_read, "bulk_read"},
@@ -1216,7 +1217,7 @@ static int mount_ubifs(struct ubifs_info *c)
        ubifs_msg("media format:       %d (latest is %d)",
                  c->fmt_version, UBIFS_FORMAT_VERSION);
        ubifs_msg("default compressor: %s", ubifs_compr_name(c->default_compr));
-       ubifs_msg("reserved pool size: %llu bytes (%llu KiB)",
+       ubifs_msg("reserved for root:  %llu bytes (%llu KiB)",
                c->report_rp_size, c->report_rp_size >> 10);
 
        dbg_msg("compiled on:         " __DATE__ " at " __TIME__);