Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68466
b: refs/heads/master
c: 43dfa07
h: refs/heads/master
v: v3
  • Loading branch information
David Woodhouse committed Jun 29, 2007
1 parent 1f705c7 commit d790938
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 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: 663d77a7ccfd407cf7491dbd53c7c17eef58c96a
refs/heads/master: 43dfa07fbb6b8bd5b6173a5bab48470f578c8e5b
5 changes: 5 additions & 0 deletions trunk/fs/jffs2/nodelist.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ static inline struct jffs2_inode_cache *jffs2_raw_ref_to_ic(struct jffs2_raw_nod
#define ref_obsolete(ref) (((ref)->flash_offset & 3) == REF_OBSOLETE)
#define mark_ref_normal(ref) do { (ref)->flash_offset = ref_offset(ref) | REF_NORMAL; } while(0)

/* Dirent nodes should be REF_PRISTINE only if they are not a deletion
dirent. Deletion dirents should be REF_NORMAL so that GC gets to
throw them away when appropriate */
#define dirent_node_state(rd) ( (je32_to_cpu((rd)->ino)?REF_PRISTINE:REF_NORMAL) )

/* NB: REF_PRISTINE for an inode-less node (ref->next_in_ino == NULL) indicates
it is an unknown node of type JFFS2_NODETYPE_RWCOMPAT_COPY, so it'll get
copied. If you need to do anything different to GC inode-less nodes, then
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/jffs2/readinode.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ static inline int read_direntry(struct jffs2_sb_info *c, struct jffs2_raw_node_r
jeb->unchecked_size -= len;
c->used_size += len;
c->unchecked_size -= len;
ref->flash_offset = ref_offset(ref) | REF_PRISTINE;
ref->flash_offset = ref_offset(ref) | dirent_node_state(rd);
spin_unlock(&c->erase_completion_lock);
}

Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/jffs2/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,8 @@ static int jffs2_scan_dirent_node(struct jffs2_sb_info *c, struct jffs2_eraseblo
return -ENOMEM;
}

fd->raw = jffs2_link_node_ref(c, jeb, ofs | REF_PRISTINE, PAD(je32_to_cpu(rd->totlen)), ic);
fd->raw = jffs2_link_node_ref(c, jeb, ofs | dirent_node_state(rd),
PAD(je32_to_cpu(rd->totlen)), ic);

fd->next = NULL;
fd->version = je32_to_cpu(rd->version);
Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/jffs2/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jff
return ERR_PTR(ret?ret:-EIO);
}
/* Mark the space used */
fd->raw = jffs2_add_physical_node_ref(c, flash_ofs | REF_PRISTINE, PAD(sizeof(*rd)+namelen), f->inocache);
fd->raw = jffs2_add_physical_node_ref(c, flash_ofs | dirent_node_state(rd),
PAD(sizeof(*rd)+namelen), f->inocache);
if (IS_ERR(fd->raw)) {
void *hold_err = fd->raw;
/* Release the full_dirent which is now useless, and return */
Expand Down
2 changes: 1 addition & 1 deletion trunk/scripts/Makefile.headersinst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ quiet_cmd_mkdir = MKDIR $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)

quiet_cmd_gen = GEN $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
cmd_gen = \
FNAME=$(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$@) \
FNAME=$(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$@); \
STUBDEF=__ASM_STUB_`echo $$FNAME | tr a-z.- A-Z__`; \
(echo "/* File autogenerated by 'make headers_install' */" ; \
echo "\#ifndef $$STUBDEF" ; \
Expand Down

0 comments on commit d790938

Please sign in to comment.