aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ubifs/lprops.c2
-rw-r--r--fs/ubifs/lpt_commit.c6
-rw-r--r--fs/ubifs/ubifs.h8
3 files changed, 8 insertions, 8 deletions
diff --git a/fs/ubifs/lprops.c b/fs/ubifs/lprops.c
index 667884f4a615..98b8e73c454c 100644
--- a/fs/ubifs/lprops.c
+++ b/fs/ubifs/lprops.c
@@ -504,7 +504,7 @@ static int is_lprops_dirty(struct ubifs_info *c, struct ubifs_lprops *lprops)
504 pnode = (struct ubifs_pnode *)container_of(lprops - pos, 504 pnode = (struct ubifs_pnode *)container_of(lprops - pos,
505 struct ubifs_pnode, 505 struct ubifs_pnode,
506 lprops[0]); 506 lprops[0]);
507 return !test_bit(COW_ZNODE, &pnode->flags) && 507 return !test_bit(COW_CNODE, &pnode->flags) &&
508 test_bit(DIRTY_CNODE, &pnode->flags); 508 test_bit(DIRTY_CNODE, &pnode->flags);
509} 509}
510 510
diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c
index dfcb5748a7dc..254e8d32fc67 100644
--- a/fs/ubifs/lpt_commit.c
+++ b/fs/ubifs/lpt_commit.c
@@ -116,8 +116,8 @@ static int get_cnodes_to_commit(struct ubifs_info *c)
116 return 0; 116 return 0;
117 cnt += 1; 117 cnt += 1;
118 while (1) { 118 while (1) {
119 ubifs_assert(!test_bit(COW_ZNODE, &cnode->flags)); 119 ubifs_assert(!test_bit(COW_CNODE, &cnode->flags));
120 __set_bit(COW_ZNODE, &cnode->flags); 120 __set_bit(COW_CNODE, &cnode->flags);
121 cnext = next_dirty_cnode(cnode); 121 cnext = next_dirty_cnode(cnode);
122 if (!cnext) { 122 if (!cnext) {
123 cnode->cnext = c->lpt_cnext; 123 cnode->cnext = c->lpt_cnext;
@@ -465,7 +465,7 @@ static int write_cnodes(struct ubifs_info *c)
465 */ 465 */
466 clear_bit(DIRTY_CNODE, &cnode->flags); 466 clear_bit(DIRTY_CNODE, &cnode->flags);
467 smp_mb__before_clear_bit(); 467 smp_mb__before_clear_bit();
468 clear_bit(COW_ZNODE, &cnode->flags); 468 clear_bit(COW_CNODE, &cnode->flags);
469 smp_mb__after_clear_bit(); 469 smp_mb__after_clear_bit();
470 offs += len; 470 offs += len;
471 dbg_chk_lpt_sz(c, 1, len); 471 dbg_chk_lpt_sz(c, 1, len);
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
index f79983d6f860..3304aad04885 100644
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -230,14 +230,14 @@ enum {
230 * LPT cnode flag bits. 230 * LPT cnode flag bits.
231 * 231 *
232 * DIRTY_CNODE: cnode is dirty 232 * DIRTY_CNODE: cnode is dirty
233 * COW_CNODE: cnode is being committed and must be copied before writing
234 * OBSOLETE_CNODE: cnode is being committed and has been copied (or deleted), 233 * OBSOLETE_CNODE: cnode is being committed and has been copied (or deleted),
235 * so it can (and must) be freed when the commit is finished 234 * so it can (and must) be freed when the commit is finished
235 * COW_CNODE: cnode is being committed and must be copied before writing
236 */ 236 */
237enum { 237enum {
238 DIRTY_CNODE = 0, 238 DIRTY_CNODE = 0,
239 COW_CNODE = 1, 239 OBSOLETE_CNODE = 1,
240 OBSOLETE_CNODE = 2, 240 COW_CNODE = 2,
241}; 241};
242 242
243/* 243/*