release/src/linux/linux/fs/dcache.c
/**
 * d_alloc_root - allocate root dentry
 * @root_inode: inode to allocate the root for
 *
 * Allocate a root ("/") dentry for the inode given. The inode is
 * instantiated and returned. %NULL is returned if there is insufficient
 * memory or the inode passed is %NULL.
 */
allocate root dentry
@root_inode: inode to allocate the root for

Allocate a root ("/") dentry for the inode given. The inode is
instantiated and returned. %NULL is returned if there is insufficient
memory or the inode passed is %NULL.
allocate root dentry @root_inode : inode to allocate the root for Allocate a root ( " / " ) dentry for the inode given . The inode is instantiated and returned . %NULL is returned if there is insufficient memory or the inode passed is %NULL .
struct dentry * d_alloc_root(struct inode * root_inode)
{
	struct dentry *res = NULL;
	if (root_inode) {
		res = d_alloc(NULL, &(const struct qstr) { "/", 1, 0 });
		if (res) {
			res->d_sb = root_inode->i_sb;
			res->d_parent = res;
			d_instantiate(res, root_inode);
		}
	}
	return res;
}
struct dentry * d_alloc_root ( struct inode * root_inode ) { struct dentry * res = NULL ; if ( root_inode ) { res = d_alloc ( NULL , & ( const struct qstr ) { " " , 1 , 0 } ) ; if ( res ) { res -> d_sb = root_inode -> i_sb ; res -> d_parent = res ; d_instantiate ( res , root_inode ) ; } } return res ; }
d_alloc_root - allocate root dentry
 @root_inode: inode to allocate the root for
d_alloc_root - allocate root dentry @root_inode : inode to allocate the root for