]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] new helper: d_obtain_alias
authorChristoph Hellwig <hch@lst.de>
Mon, 11 Aug 2008 13:48:57 +0000 (15:48 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 23 Oct 2008 09:13:00 +0000 (05:13 -0400)
commit2c6e1df9656ca35eb554b3de25a5bbb937654175
treeb473278d0df8d869d183fbc0e4a1a07585de240a
parentdf1247ccab1e0028124fb2249ea8cab9ebeeebab
[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>
fs/dcache.c
fs/libfs.c
include/linux/dcache.h