diff options
| author | Artem Bityutskiy <[email protected]> | 2008-12-22 09:09:04 +0000 |
|---|---|---|
| committer | Artem Bityutskiy <[email protected]> | 2008-12-23 10:24:05 +0000 |
| commit | 650ed50f4298e76007070b7ab9d640dfe7228ab3 (patch) | |
| tree | 3756cfa59d1ed5aab403e67529b6b65a14a9cc70 /fs/ubifs/tnc_commit.c | |
| parent | UBIFS: use nicer 64-bit math (diff) | |
| download | kernel-650ed50f4298e76007070b7ab9d640dfe7228ab3.tar.gz kernel-650ed50f4298e76007070b7ab9d640dfe7228ab3.zip | |
UBIFS: re-calculate min_idx_size after the commit
When we commit, but before we try to write anything to the flash
media, @c->min_idx_size is inaccurate, because we do not re-calculate
it after the commit. Do not forget to do this.
Signed-off-by: Artem Bityutskiy <[email protected]>
Diffstat (limited to 'fs/ubifs/tnc_commit.c')
| -rw-r--r-- | fs/ubifs/tnc_commit.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ubifs/tnc_commit.c b/fs/ubifs/tnc_commit.c index 3c0af452887b..fde8d127c768 100644 --- a/fs/ubifs/tnc_commit.c +++ b/fs/ubifs/tnc_commit.c @@ -802,8 +802,10 @@ int ubifs_tnc_start_commit(struct ubifs_info *c, struct ubifs_zbranch *zroot) * budgeting subsystem to assume the index is already committed, * even though it is not. */ + ubifs_assert(c->min_idx_lebs == ubifs_calc_min_idx_lebs(c)); c->old_idx_sz = c->calc_idx_sz; c->budg_uncommitted_idx = 0; + c->min_idx_lebs = ubifs_calc_min_idx_lebs(c); spin_unlock(&c->space_lock); mutex_unlock(&c->tnc_mutex); |
