---
name: "d_instantiate_unique"
section: "9"
platform: "linux"
package: "linux-manual-2.6.18"
version: "2.6.18.dfsg.1-26etch2"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/d_instantiate_unique"
---

# d\_instantiate\_unique(9)

instantiate a non-aliased dentry

## NAME

d\_instantiate\_unique - instantiate a non-aliased dentry

## SYNOPSIS

**struct dentry \* d\_instantiate\_unique(struct dentry \*** *entry***, struct inode \*** *inode***);**

## ARGUMENTS

*entry*

dentry to instantiate

*inode*

inode to attach to this dentry

## DESCRIPTION

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.

## COPYRIGHT
