diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-07-21 10:14:29 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-08-13 04:27:47 -0400 |
commit | 014eb04b03202dc75c1c749df4246d98045f5e69 (patch) | |
tree | 99edd8f2907b478616bba8d44a308b6b750ead99 /fs/ubifs/orphan.c | |
parent | fd6c6b51e3677937090314b20b00f2194900d81b (diff) |
UBIFS: increment commit number earlier
Increment the commit number at the beginnig of the commit, instead
of doing this after the commit. This is needed for further
optimizations.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/orphan.c')
-rw-r--r-- | fs/ubifs/orphan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ubifs/orphan.c b/fs/ubifs/orphan.c index 3afeb9242c6a..02d3462f4d3e 100644 --- a/fs/ubifs/orphan.c +++ b/fs/ubifs/orphan.c | |||
@@ -310,10 +310,10 @@ static int write_orph_node(struct ubifs_info *c, int atomic) | |||
310 | c->cmt_orphans -= cnt; | 310 | c->cmt_orphans -= cnt; |
311 | spin_unlock(&c->orphan_lock); | 311 | spin_unlock(&c->orphan_lock); |
312 | if (c->cmt_orphans) | 312 | if (c->cmt_orphans) |
313 | orph->cmt_no = cpu_to_le64(c->cmt_no + 1); | 313 | orph->cmt_no = cpu_to_le64(c->cmt_no); |
314 | else | 314 | else |
315 | /* Mark the last node of the commit */ | 315 | /* Mark the last node of the commit */ |
316 | orph->cmt_no = cpu_to_le64((c->cmt_no + 1) | (1ULL << 63)); | 316 | orph->cmt_no = cpu_to_le64((c->cmt_no) | (1ULL << 63)); |
317 | ubifs_assert(c->ohead_offs + len <= c->leb_size); | 317 | ubifs_assert(c->ohead_offs + len <= c->leb_size); |
318 | ubifs_assert(c->ohead_lnum >= c->orph_first); | 318 | ubifs_assert(c->ohead_lnum >= c->orph_first); |
319 | ubifs_assert(c->ohead_lnum <= c->orph_last); | 319 | ubifs_assert(c->ohead_lnum <= c->orph_last); |