---
name: "dget"
section: "9"
platform: "linux"
package: "linux-manual-2.6.32"
version: "2.6.32-48squeeze6"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/dget/9"
---

# dget(9)

get a reference to a dentry

## NAME

dget - get a reference to a dentry

## SYNOPSIS

**struct dentry \* dget(struct dentry \*** *dentry***);**

## ARGUMENTS

*dentry*

dentry to get a reference to

## DESCRIPTION

Given a dentry or **NULL** pointer increment the reference count if appropriate and return the dentry. A dentry will not be destroyed when it has references. **dget** should never be called for dentries with zero reference counter. For these cases (preferably none, functions in dcache.c are sufficient for normal needs and they take necessary precautions) you should hold dcache\_lock and call **dget\_locked** instead of **dget**.

## COPYRIGHT
