diff options
Diffstat (limited to 'fs/ubifs/tnc_commit.c')
-rw-r--r-- | fs/ubifs/tnc_commit.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/ubifs/tnc_commit.c b/fs/ubifs/tnc_commit.c index 8ac76b1c2d55..fde8d127c768 100644 --- a/fs/ubifs/tnc_commit.c +++ b/fs/ubifs/tnc_commit.c | |||
@@ -553,8 +553,8 @@ static int layout_in_empty_space(struct ubifs_info *c) | |||
553 | } | 553 | } |
554 | 554 | ||
555 | #ifdef CONFIG_UBIFS_FS_DEBUG | 555 | #ifdef CONFIG_UBIFS_FS_DEBUG |
556 | c->new_ihead_lnum = lnum; | 556 | c->dbg->new_ihead_lnum = lnum; |
557 | c->new_ihead_offs = buf_offs; | 557 | c->dbg->new_ihead_offs = buf_offs; |
558 | #endif | 558 | #endif |
559 | 559 | ||
560 | return 0; | 560 | return 0; |
@@ -802,8 +802,10 @@ int ubifs_tnc_start_commit(struct ubifs_info *c, struct ubifs_zbranch *zroot) | |||
802 | * budgeting subsystem to assume the index is already committed, | 802 | * budgeting subsystem to assume the index is already committed, |
803 | * even though it is not. | 803 | * even though it is not. |
804 | */ | 804 | */ |
805 | ubifs_assert(c->min_idx_lebs == ubifs_calc_min_idx_lebs(c)); | ||
805 | c->old_idx_sz = c->calc_idx_sz; | 806 | c->old_idx_sz = c->calc_idx_sz; |
806 | c->budg_uncommitted_idx = 0; | 807 | c->budg_uncommitted_idx = 0; |
808 | c->min_idx_lebs = ubifs_calc_min_idx_lebs(c); | ||
807 | spin_unlock(&c->space_lock); | 809 | spin_unlock(&c->space_lock); |
808 | mutex_unlock(&c->tnc_mutex); | 810 | mutex_unlock(&c->tnc_mutex); |
809 | 811 | ||
@@ -1002,7 +1004,8 @@ static int write_index(struct ubifs_info *c) | |||
1002 | } | 1004 | } |
1003 | 1005 | ||
1004 | #ifdef CONFIG_UBIFS_FS_DEBUG | 1006 | #ifdef CONFIG_UBIFS_FS_DEBUG |
1005 | if (lnum != c->new_ihead_lnum || buf_offs != c->new_ihead_offs) { | 1007 | if (lnum != c->dbg->new_ihead_lnum || |
1008 | buf_offs != c->dbg->new_ihead_offs) { | ||
1006 | ubifs_err("inconsistent ihead"); | 1009 | ubifs_err("inconsistent ihead"); |
1007 | return -EINVAL; | 1010 | return -EINVAL; |
1008 | } | 1011 | } |