]> git.karo-electronics.de Git - karo-tx-linux.git/commit
sysfs: reorganize sysfs_new_indoe() and sysfs_create()
authorTejun Heo <htejun@gmail.com>
Wed, 13 Jun 2007 18:45:17 +0000 (03:45 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 11 Jul 2007 23:09:07 +0000 (16:09 -0700)
commitfc9f54b9982e14e6dbe023425c87ffbfd6992c45
tree61b828ac694d9e8decb02022a1056a5367bb1bef
parent7f7cfffe60ed6271c4028ec79ae1c297b44bcb14
sysfs: reorganize sysfs_new_indoe() and sysfs_create()

Reorganize/clean up sysfs_new_inode() and sysfs_create().

* sysfs_init_inode() is separated out from sysfs_new_inode() and is
  responsible for basic initialization.
* sysfs_instantiate() replaces the last step of sysfs_create() and is
  responsible for dentry instantitaion.
* type-specific initialization is moved out to the callers.
* mode is specified only once when creating a sysfs_dirent.
* spurious list_del_init(&sd->s_sibling) dropped from create_dir()

This change is to

* prepare for inode allocation fix.
* separate alloc and init code for synchronization update.
* make dentry/inode initialization more flexible for later changes.

This patch doesn't introduce visible behavior change.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/sysfs/dir.c
fs/sysfs/inode.c
fs/sysfs/mount.c
fs/sysfs/sysfs.h