kernels/linux-2.4.0/fs/jffs/intrep.c
/* Just remove the file from the parent's children.  Don't free
   any memory.  */
Just remove the file from the parent's children.  Don't free
any memory.
Just remove the file from the parent ' s children . Don ' t free any memory .
int
jffs_unlink_file_from_tree(struct jffs_file *f)
{
	D3(printk("jffs_unlink_file_from_tree(): ino: %d, pino: %d, name: "
		  "\"%s\"\n", f->ino, f->pino, (f->name ? f->name : "")));
	if (f->sibling_prev) {
		f->sibling_prev->sibling_next = f->sibling_next;
	}
	else if (f->parent) {
	        D3(printk("f->parent=%p\n", f->parent));
		f->parent->children = f->sibling_next;
	}
	if (f->sibling_next) {
		f->sibling_next->sibling_prev = f->sibling_prev;
	}
	return 0;
}
int jffs_unlink_file_from_tree ( struct jffs_file * f ) { D3 ( printk ( " " " \" \" \n " , f -> ino , f -> pino , ( f -> name ? f -> name : " " ) ) ) ; if ( f -> sibling_prev ) { f -> sibling_prev -> sibling_next = f -> sibling_next ; } else if ( f -> parent ) { D3 ( printk ( " \n " , f -> parent ) ) ; f -> parent -> children = f -> sibling_next ; } if ( f -> sibling_next ) { f -> sibling_next -> sibling_prev = f -> sibling_prev ; } return 0 ; }
Just remove the file from the parent's children.
Just remove the file from the parent ' s children .