summaryrefslogtreecommitdiffstats
path: root/fs/sysfs
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-12-11 16:03:00 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-17 08:59:15 -0800
commit80b9bbefc345079bddc4959de016ba4074b0c8d6 (patch)
tree24d24636b01d9f9e31b39e08a8cfd0978ce9fd9d /fs/sysfs
parent19bbb926203dbcf3a03915e934c36d7681bf6e13 (diff)
downloadop-kernel-dev-80b9bbefc345079bddc4959de016ba4074b0c8d6.zip
op-kernel-dev-80b9bbefc345079bddc4959de016ba4074b0c8d6.tar.gz
kernfs: add kernfs_dir_ops
Add support for mkdir(2), rmdir(2) and rename(2) syscalls. This is implemented through optional kernfs_dir_ops callback table which can be specified on kernfs_create_root(). An implemented callback is invoked when the matching syscall is invoked. As kernfs keep dcache syncs with internal representation and revalidates dentries on each access, the implementation of these methods is extremely simple. Each just discovers the relevant kernfs_node(s) and invokes the requested callback which is allowed to do any kernfs operations and the end result doesn't necessarily have to match the expected semantics of the syscall. This will be used to convert cgroup to use kernfs instead of its own filesystem implementation. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs')
-rw-r--r--fs/sysfs/mount.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
index 701a56f..6211230 100644
--- a/fs/sysfs/mount.c
+++ b/fs/sysfs/mount.c
@@ -62,7 +62,7 @@ int __init sysfs_init(void)
{
int err;
- sysfs_root = kernfs_create_root(NULL);
+ sysfs_root = kernfs_create_root(NULL, NULL);
if (IS_ERR(sysfs_root))
return PTR_ERR(sysfs_root);
OpenPOWER on IntegriCloud