diff options
author | Christoph Hellwig <hch@lst.de> | 2008-08-11 09:48:57 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-23 05:13:00 -0400 |
commit | 4ea3ada2955e4519befa98ff55dd62d6dfbd1705 (patch) | |
tree | b473278d0df8d869d183fbc0e4a1a07585de240a /include/linux | |
parent | 3a8cff4f026c0b98bee6291eb28d4df42feb76dc (diff) |
[PATCH] new helper: d_obtain_alias
The calling conventions of d_alloc_anon are rather unfortunate for all
users, and it's name is not very descriptive either.
Add d_obtain_alias as a new exported helper that drops the inode
reference in the failure case, too and allows to pass-through NULL
pointers and inodes to allow for tail-calls in the export operations.
Incidentally this helper already existed as a private function in
libfs.c as exportfs_d_alloc so kill that one and switch the callers
to d_obtain_alias.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/dcache.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index efba1de629ac..2404257d6c67 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -231,6 +231,7 @@ extern struct dentry * d_alloc(struct dentry *, const struct qstr *); | |||
231 | extern struct dentry * d_alloc_anon(struct inode *); | 231 | extern struct dentry * d_alloc_anon(struct inode *); |
232 | extern struct dentry * d_splice_alias(struct inode *, struct dentry *); | 232 | extern struct dentry * d_splice_alias(struct inode *, struct dentry *); |
233 | extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *); | 233 | extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *); |
234 | extern struct dentry * d_obtain_alias(struct inode *); | ||
234 | extern void shrink_dcache_sb(struct super_block *); | 235 | extern void shrink_dcache_sb(struct super_block *); |
235 | extern void shrink_dcache_parent(struct dentry *); | 236 | extern void shrink_dcache_parent(struct dentry *); |
236 | extern void shrink_dcache_for_umount(struct super_block *); | 237 | extern void shrink_dcache_for_umount(struct super_block *); |