diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2025-09-19 17:46:01 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2025-11-16 01:35:01 -0500 |
| commit | 1552ddc7fade1ae55af298580ef6c913b8db74bc (patch) | |
| tree | 1f3890ab31ceba18b37265f0bfb27afe9f76b0ab /fs/libfs.c | |
| parent | 4051a9115ad24bb9a691774730ca9c1dd56de665 (diff) | |
| download | linux-1552ddc7fade1ae55af298580ef6c913b8db74bc.tar.gz linux-1552ddc7fade1ae55af298580ef6c913b8db74bc.tar.bz2 linux-1552ddc7fade1ae55af298580ef6c913b8db74bc.zip | |
new helper: simple_done_creating()
should be paired with simple_start_creating() - unlocks parent and
drops dentry reference.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/libfs.c')
| -rw-r--r-- | fs/libfs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/libfs.c b/fs/libfs.c index d029aff41f66..a033f35493d0 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -2326,3 +2326,11 @@ struct dentry *simple_start_creating(struct dentry *parent, const char *name) return dentry; } EXPORT_SYMBOL(simple_start_creating); + +/* parent must have been held exclusive since simple_start_creating() */ +void simple_done_creating(struct dentry *child) +{ + inode_unlock(child->d_parent->d_inode); + dput(child); +} +EXPORT_SYMBOL(simple_done_creating); |
