kernels/linux-2.4.0/fs/jffs/intrep.c
/* Create and initialize a new struct jffs_file.  */
Create and initialize a new struct jffs_file.
Create and initialize a new struct jffs_file .
static struct jffs_file *
jffs_create_file(struct jffs_control *c,
		 const struct jffs_raw_inode *raw_inode)
{
	struct jffs_file *f;
	if (!(f = (struct jffs_file *)kmalloc(sizeof(struct jffs_file),
					      GFP_KERNEL))) {
		D(printk("jffs_create_file(): Failed!\n"));
		return 0;
	}
	DJM(no_jffs_file++);
	memset(f, 0, sizeof(struct jffs_file));
	f->ino = raw_inode->ino;
	f->pino = raw_inode->pino;
	f->nlink = raw_inode->nlink;
	f->deleted = raw_inode->deleted;
	f->c = c;
	return f;
}
static struct jffs_file * jffs_create_file ( struct jffs_control * c , const struct jffs_raw_inode * raw_inode ) { struct jffs_file * f ; if ( ! ( f = ( struct jffs_file * ) kmalloc ( sizeof ( struct jffs_file ) , GFP_KERNEL ) ) ) { D ( printk ( " \n " ) ) ; return 0 ; } DJM ( no_jffs_file ++ ) ; memset ( f , 0 , sizeof ( struct jffs_file ) ) ; f -> ino = raw_inode -> ino ; f -> pino = raw_inode -> pino ; f -> nlink = raw_inode -> nlink ; f -> deleted = raw_inode -> deleted ; f -> c = c ; return f ; }
Create and initialize a new struct jffs_file.
Create and initialize a new struct jffs_file .