kernels/linux-2.4.0/mm/shmem.c
/*
 * File creation. Allocate an inode, and we're done..
 */
File creation. Allocate an inode, and we're done
File creation . Allocate an inode and we ' re done
static int shmem_mknod(struct inode *dir, struct dentry *dentry, int mode, int dev)
{
	struct inode * inode = shmem_get_inode(dir->i_sb, mode, dev);
	int error = -ENOSPC;
	if (inode) {
		d_instantiate(dentry, inode);
		dget(dentry); 
		error = 0;
	}
	return error;
}
static int shmem_mknod ( struct inode * dir , struct dentry * dentry , int mode , int dev ) { struct inode * inode = shmem_get_inode ( dir -> i_sb , mode , dev ) ; int error = - ENOSPC ; if ( inode ) { d_instantiate ( dentry , inode ) ; dget ( dentry ) ; error = 0 ; } return error ; }
File creation.
File creation .
/* Extra count - pin the dentry in core */