Lines Matching full:ic

37 next_inode(int *i, struct jffs2_inode_cache *ic, struct jffs2_sb_info *c)  in next_inode()  argument
40 if (ic->next) in next_inode()
41 return ic->next; in next_inode()
46 #define for_each_inode(i, c, ic) \ argument
47 for (i = 0, ic = first_inode_chain(&i, (c)); \
48 ic; \
49 ic = next_inode(&i, ic, (c)))
53 struct jffs2_inode_cache *ic, in jffs2_build_inode_pass1() argument
58 dbg_fsbuild("building directory inode #%u\n", ic->ino); in jffs2_build_inode_pass1()
61 for(fd = ic->scan_dents; fd; fd = fd->next) { in jffs2_build_inode_pass1()
71 fd->name, fd->ino, ic->ino); in jffs2_build_inode_pass1()
73 /* Clear the ic/raw union so it doesn't cause problems later. */ in jffs2_build_inode_pass1()
74 fd->ic = NULL; in jffs2_build_inode_pass1()
78 /* From this point, fd->raw is no longer used so we can set fd->ic */ in jffs2_build_inode_pass1()
79 fd->ic = child_ic; in jffs2_build_inode_pass1()
102 struct jffs2_inode_cache *ic; in jffs2_build_filesystem() local
123 for_each_inode(i, c, ic) { in jffs2_build_filesystem()
124 if (ic->scan_dents) { in jffs2_build_filesystem()
125 jffs2_build_inode_pass1(c, ic, &dir_hardlinks); in jffs2_build_filesystem()
139 for_each_inode(i, c, ic) { in jffs2_build_filesystem()
140 if (ic->pino_nlink) in jffs2_build_filesystem()
143 jffs2_build_remove_unlinked_inode(c, ic, &dead_fds); in jffs2_build_filesystem()
153 ic = jffs2_get_ino_cache(c, fd->ino); in jffs2_build_filesystem()
155 if (ic) in jffs2_build_filesystem()
156 jffs2_build_remove_unlinked_inode(c, ic, &dead_fds); in jffs2_build_filesystem()
170 for_each_inode(i, c, ic) { in jffs2_build_filesystem()
171 if (ic->flags & INO_FLAGS_IS_DIR) in jffs2_build_filesystem()
172 ic->pino_nlink = 0; in jffs2_build_filesystem()
178 for_each_inode(i, c, ic) { in jffs2_build_filesystem()
179 while(ic->scan_dents) { in jffs2_build_filesystem()
180 fd = ic->scan_dents; in jffs2_build_filesystem()
181 ic->scan_dents = fd->next; in jffs2_build_filesystem()
187 if (!fd->ic) { in jffs2_build_filesystem()
194 BUG_ON(!(fd->ic->flags & INO_FLAGS_IS_DIR)); in jffs2_build_filesystem()
196 /* We clear ic->pino_nlink ∀ directories' ic *only* if dir_hardlinks in jffs2_build_filesystem()
198 * we don't do the check. And ic->pino_nlink still contains the nlink in jffs2_build_filesystem()
200 if (dir_hardlinks && fd->ic->pino_nlink) { in jffs2_build_filesystem()
202 fd->name, fd->ino, ic->ino, fd->ic->pino_nlink); in jffs2_build_filesystem()
206 /* For directories, ic->pino_nlink holds that parent inode # */ in jffs2_build_filesystem()
207 fd->ic->pino_nlink = ic->ino; in jffs2_build_filesystem()
211 ic->scan_dents = NULL; in jffs2_build_filesystem()
229 for_each_inode(i, c, ic) { in jffs2_build_filesystem()
230 while(ic->scan_dents) { in jffs2_build_filesystem()
231 fd = ic->scan_dents; in jffs2_build_filesystem()
232 ic->scan_dents = fd->next; in jffs2_build_filesystem()
243 struct jffs2_inode_cache *ic, in jffs2_build_remove_unlinked_inode() argument
249 dbg_fsbuild("removing ino #%u with nlink == zero.\n", ic->ino); in jffs2_build_remove_unlinked_inode()
251 raw = ic->nodes; in jffs2_build_remove_unlinked_inode()
252 while (raw != (void *)ic) { in jffs2_build_remove_unlinked_inode()
259 if (ic->scan_dents) { in jffs2_build_remove_unlinked_inode()
261 dbg_fsbuild("inode #%u was a directory which may have children...\n", ic->ino); in jffs2_build_remove_unlinked_inode()
263 while(ic->scan_dents) { in jffs2_build_remove_unlinked_inode()
266 fd = ic->scan_dents; in jffs2_build_remove_unlinked_inode()
267 ic->scan_dents = fd->next; in jffs2_build_remove_unlinked_inode()