mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 07:31:41 +00:00
kernfs: add an API to get kernfs node from inode number
Add an API to get kernfs node from inode number. We will need this to implement exportfs operations. This API will be used in blktrace too later, so it should be as fast as possible. To make the API lock free, kernfs node is freed in RCU context. And we depend on kernfs_node count/ino number to filter out stale kernfs nodes. Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
4a3ef68aca
commit
ba16b2846a
3 changed files with 69 additions and 1 deletions
|
@ -98,6 +98,8 @@ int kernfs_add_one(struct kernfs_node *kn);
|
|||
struct kernfs_node *kernfs_new_node(struct kernfs_node *parent,
|
||||
const char *name, umode_t mode,
|
||||
unsigned flags);
|
||||
struct kernfs_node *kernfs_find_and_get_node_by_ino(struct kernfs_root *root,
|
||||
unsigned int ino);
|
||||
|
||||
/*
|
||||
* file.c
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue