summaryrefslogtreecommitdiffstats
path: root/fs/kernfs/kernfs-internal.h
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2017-07-12 11:49:48 -0700
committerJens Axboe <axboe@kernel.dk>2017-07-29 09:00:03 -0600
commitba16b2846a8c6965d0d35be3968bc10f6277812d (patch)
tree332d1796149f4e5eb713fcf95b44cc6177965158 /fs/kernfs/kernfs-internal.h
parent4a3ef68acacf31570066e69593de5cc49cc91638 (diff)
downloadblackbird-obmc-linux-ba16b2846a8c6965d0d35be3968bc10f6277812d.tar.gz
blackbird-obmc-linux-ba16b2846a8c6965d0d35be3968bc10f6277812d.zip
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>
Diffstat (limited to 'fs/kernfs/kernfs-internal.h')
-rw-r--r--fs/kernfs/kernfs-internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/kernfs/kernfs-internal.h b/fs/kernfs/kernfs-internal.h
index 2d5144ab4251..e9c226f29828 100644
--- a/fs/kernfs/kernfs-internal.h
+++ b/fs/kernfs/kernfs-internal.h
@@ -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
OpenPOWER on IntegriCloud