diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-02 18:57:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-02 18:57:47 -0500 |
commit | 8e3bda0863c1578ddf47a015eac7dc6efb1ef48b (patch) | |
tree | b3257fc9b005352a7c3536097123de97f43748a2 /fs/ubifs/commit.c | |
parent | 574c3fdae3890e60f8bc59e8107686944ba1e446 (diff) | |
parent | 8e5033adc78ff4fbeab7052134e7af1f6ff04187 (diff) |
Merge branch 'linux-next' of git://git.infradead.org/ubifs-2.6
* 'linux-next' of git://git.infradead.org/ubifs-2.6: (33 commits)
UBIFS: add more useful debugging prints
UBIFS: print debugging messages properly
UBIFS: fix numerous spelling mistakes
UBIFS: allow mounting when short of space
UBIFS: fix writing uncompressed files
UBIFS: fix checkpatch.pl warnings
UBIFS: fix sparse warnings
UBIFS: simplify make_free_space
UBIFS: do not lie about used blocks
UBIFS: restore budg_uncommitted_idx
UBIFS: always commit on unmount
UBIFS: use ubi_sync
UBIFS: always commit in sync_fs
UBIFS: fix file-system synchronization
UBIFS: fix constants initialization
UBIFS: avoid unnecessary calculations
UBIFS: re-calculate min_idx_size after the commit
UBIFS: use nicer 64-bit math
UBIFS: fix available blocks count
UBIFS: various comment improvements and fixes
...
Diffstat (limited to 'fs/ubifs/commit.c')
-rw-r--r-- | fs/ubifs/commit.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/fs/ubifs/commit.c b/fs/ubifs/commit.c index b49884c8c10e..f3a7945527fb 100644 --- a/fs/ubifs/commit.c +++ b/fs/ubifs/commit.c | |||
@@ -470,12 +470,12 @@ int dbg_old_index_check_init(struct ubifs_info *c, struct ubifs_zbranch *zroot) | |||
470 | { | 470 | { |
471 | struct ubifs_idx_node *idx; | 471 | struct ubifs_idx_node *idx; |
472 | int lnum, offs, len, err = 0; | 472 | int lnum, offs, len, err = 0; |
473 | struct ubifs_debug_info *d = c->dbg; | ||
473 | 474 | ||
474 | c->old_zroot = *zroot; | 475 | d->old_zroot = *zroot; |
475 | 476 | lnum = d->old_zroot.lnum; | |
476 | lnum = c->old_zroot.lnum; | 477 | offs = d->old_zroot.offs; |
477 | offs = c->old_zroot.offs; | 478 | len = d->old_zroot.len; |
478 | len = c->old_zroot.len; | ||
479 | 479 | ||
480 | idx = kmalloc(c->max_idx_node_sz, GFP_NOFS); | 480 | idx = kmalloc(c->max_idx_node_sz, GFP_NOFS); |
481 | if (!idx) | 481 | if (!idx) |
@@ -485,8 +485,8 @@ int dbg_old_index_check_init(struct ubifs_info *c, struct ubifs_zbranch *zroot) | |||
485 | if (err) | 485 | if (err) |
486 | goto out; | 486 | goto out; |
487 | 487 | ||
488 | c->old_zroot_level = le16_to_cpu(idx->level); | 488 | d->old_zroot_level = le16_to_cpu(idx->level); |
489 | c->old_zroot_sqnum = le64_to_cpu(idx->ch.sqnum); | 489 | d->old_zroot_sqnum = le64_to_cpu(idx->ch.sqnum); |
490 | out: | 490 | out: |
491 | kfree(idx); | 491 | kfree(idx); |
492 | return err; | 492 | return err; |
@@ -509,6 +509,7 @@ int dbg_check_old_index(struct ubifs_info *c, struct ubifs_zbranch *zroot) | |||
509 | { | 509 | { |
510 | int lnum, offs, len, err = 0, uninitialized_var(last_level), child_cnt; | 510 | int lnum, offs, len, err = 0, uninitialized_var(last_level), child_cnt; |
511 | int first = 1, iip; | 511 | int first = 1, iip; |
512 | struct ubifs_debug_info *d = c->dbg; | ||
512 | union ubifs_key lower_key, upper_key, l_key, u_key; | 513 | union ubifs_key lower_key, upper_key, l_key, u_key; |
513 | unsigned long long uninitialized_var(last_sqnum); | 514 | unsigned long long uninitialized_var(last_sqnum); |
514 | struct ubifs_idx_node *idx; | 515 | struct ubifs_idx_node *idx; |
@@ -525,9 +526,9 @@ int dbg_check_old_index(struct ubifs_info *c, struct ubifs_zbranch *zroot) | |||
525 | UBIFS_IDX_NODE_SZ; | 526 | UBIFS_IDX_NODE_SZ; |
526 | 527 | ||
527 | /* Start at the old zroot */ | 528 | /* Start at the old zroot */ |
528 | lnum = c->old_zroot.lnum; | 529 | lnum = d->old_zroot.lnum; |
529 | offs = c->old_zroot.offs; | 530 | offs = d->old_zroot.offs; |
530 | len = c->old_zroot.len; | 531 | len = d->old_zroot.len; |
531 | iip = 0; | 532 | iip = 0; |
532 | 533 | ||
533 | /* | 534 | /* |
@@ -560,11 +561,11 @@ int dbg_check_old_index(struct ubifs_info *c, struct ubifs_zbranch *zroot) | |||
560 | if (first) { | 561 | if (first) { |
561 | first = 0; | 562 | first = 0; |
562 | /* Check root level and sqnum */ | 563 | /* Check root level and sqnum */ |
563 | if (le16_to_cpu(idx->level) != c->old_zroot_level) { | 564 | if (le16_to_cpu(idx->level) != d->old_zroot_level) { |
564 | err = 2; | 565 | err = 2; |
565 | goto out_dump; | 566 | goto out_dump; |
566 | } | 567 | } |
567 | if (le64_to_cpu(idx->ch.sqnum) != c->old_zroot_sqnum) { | 568 | if (le64_to_cpu(idx->ch.sqnum) != d->old_zroot_sqnum) { |
568 | err = 3; | 569 | err = 3; |
569 | goto out_dump; | 570 | goto out_dump; |
570 | } | 571 | } |