]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: export fhandle info for a cgroup
authorShaohua Li <shli@fb.com>
Wed, 12 Jul 2017 18:49:52 +0000 (11:49 -0700)
committerJens Axboe <axboe@kernel.dk>
Sat, 29 Jul 2017 15:00:03 +0000 (09:00 -0600)
commit680c23b6b2b141897f259d177f6704b4ae272233
tree3811dbdbf764aa2b4cda99d87aa58793f2a747e1
parent900933d82864df5b331ccf1fde47c45f5269d7a1
cgroup: export fhandle info for a cgroup

Add an API to export cgroup fhandle info. We don't export a full 'struct
file_handle', there are unrequired info. Sepcifically, cgroup is always
a directory, so we don't need a 'FILEID_INO32_GEN_PARENT' type fhandle,
we only need export the inode number and generation number just like
what generic_fh_to_dentry does. And we can avoid the overhead of getting
an inode too, since kernfs_node_id (ino and generation) has all the info
required.

Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/cgroup.h