---
name: "lookup_create"
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/lookup_create"
---

# lookup\_create(9)

lookup a dentry, creating it if it doesn't exist

## NAME

lookup\_create - lookup a dentry, creating it if it doesn't exist

## SYNOPSIS

**struct dentry \* lookup\_create(struct nameidata \*** *nd***, int** *is\_dir***);**

## ARGUMENTS

*nd*

nameidata info

*is\_dir*

directory flag

## DESCRIPTION

Simple function to lookup and return a dentry and create it if it doesn't exist. Is SMP-safe.

Returns with nd-\>path.dentry-\>d\_inode-\>i\_mutex locked.

## COPYRIGHT
