Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108540
b: refs/heads/master
c: 014eb04
h: refs/heads/master
v: v3
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Aug 13, 2008
1 parent 7f8f9fd commit 290c6ec
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fd6c6b51e3677937090314b20b00f2194900d81b
refs/heads/master: 014eb04b03202dc75c1c749df4246d98045f5e69
3 changes: 2 additions & 1 deletion trunk/fs/ubifs/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ static int do_commit(struct ubifs_info *c)
goto out_up;
}

c->cmt_no += 1;
err = ubifs_gc_start_commit(c);
if (err)
goto out_up;
Expand Down Expand Up @@ -115,7 +116,7 @@ static int do_commit(struct ubifs_info *c)
goto out;

mutex_lock(&c->mst_mutex);
c->mst_node->cmt_no = cpu_to_le64(++c->cmt_no);
c->mst_node->cmt_no = cpu_to_le64(c->cmt_no);
c->mst_node->log_lnum = cpu_to_le32(new_ltail_lnum);
c->mst_node->root_lnum = cpu_to_le32(zroot.lnum);
c->mst_node->root_offs = cpu_to_le32(zroot.offs);
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/ubifs/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ int ubifs_log_start_commit(struct ubifs_info *c, int *ltail_lnum)
return -ENOMEM;

cs->ch.node_type = UBIFS_CS_NODE;
cs->cmt_no = cpu_to_le64(c->cmt_no + 1);
cs->cmt_no = cpu_to_le64(c->cmt_no);
ubifs_prepare_node(c, cs, UBIFS_CS_NODE_SZ, 0);

/*
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/ubifs/orphan.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,10 @@ static int write_orph_node(struct ubifs_info *c, int atomic)
c->cmt_orphans -= cnt;
spin_unlock(&c->orphan_lock);
if (c->cmt_orphans)
orph->cmt_no = cpu_to_le64(c->cmt_no + 1);
orph->cmt_no = cpu_to_le64(c->cmt_no);
else
/* Mark the last node of the commit */
orph->cmt_no = cpu_to_le64((c->cmt_no + 1) | (1ULL << 63));
orph->cmt_no = cpu_to_le64((c->cmt_no) | (1ULL << 63));
ubifs_assert(c->ohead_offs + len <= c->leb_size);
ubifs_assert(c->ohead_lnum >= c->orph_first);
ubifs_assert(c->ohead_lnum <= c->orph_last);
Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/ubifs/ubifs.h
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,8 @@ struct ubifs_mount_opts {
* @highest_inum: highest used inode number
* @vfs_gen: VFS inode generation counter
* @max_sqnum: current global sequence number
* @cmt_no: commit number (last successfully completed commit)
* @cmt_no: commit number of the last successfully completed commit, protected
* by @commit_sem
* @cnt_lock: protects @highest_inum, @vfs_gen, and @max_sqnum counters
* @fmt_version: UBIFS on-flash format version
* @uuid: UUID from super block
Expand Down

0 comments on commit 290c6ec

Please sign in to comment.