d_instantiate_unique(9)

d_instantiate_unique9

Instantiate a non-aliased dentry

Usage

struct dentry * d_instantiate_unique(struct dentry * entry, struct inode * inode);

Arguments

entry

dentry to instantiate

inode

inode to attach to this dentry

Overview

Fill in inode information in the entry. On success, it returns NULL. If an unhashed alias of “entry” already exists, then we return the aliased dentry instead and drop one reference to inode.

Note that in order to avoid conflicts with rename etc, the caller had better be holding the parent directory semaphore.

This also assumes that the inode count has been incremented (or otherwise set) by the caller to indicate that it is now in use by the dcache.

From linux-manual-2.6.18 2.6.18.dfsg.1-26etch2 in Debian 4.0 (Etch). Parsed by carta from the page's man source.