diff options
author | Tejun Heo <htejun@gmail.com> | 2007-06-13 14:45:17 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-11 19:09:07 -0400 |
commit | fc9f54b9982e14e6dbe023425c87ffbfd6992c45 (patch) | |
tree | 61b828ac694d9e8decb02022a1056a5367bb1bef /fs/sysfs/sysfs.h | |
parent | 7f7cfffe60ed6271c4028ec79ae1c297b44bcb14 (diff) |
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>
Diffstat (limited to 'fs/sysfs/sysfs.h')
-rw-r--r-- | fs/sysfs/sysfs.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h index fc6aa863b947..143fdbe56c14 100644 --- a/fs/sysfs/sysfs.h +++ b/fs/sysfs/sysfs.h | |||
@@ -57,9 +57,9 @@ extern struct vfsmount * sysfs_mount; | |||
57 | extern struct kmem_cache *sysfs_dir_cachep; | 57 | extern struct kmem_cache *sysfs_dir_cachep; |
58 | 58 | ||
59 | extern void sysfs_delete_inode(struct inode *inode); | 59 | extern void sysfs_delete_inode(struct inode *inode); |
60 | extern struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent *); | 60 | extern void sysfs_init_inode(struct sysfs_dirent *sd, struct inode *inode); |
61 | extern int sysfs_create(struct sysfs_dirent *sd, struct dentry *dentry, | 61 | extern struct inode * sysfs_new_inode(struct sysfs_dirent *sd); |
62 | int mode, int (*init)(struct inode *)); | 62 | extern void sysfs_instantiate(struct dentry *dentry, struct inode *inode); |
63 | 63 | ||
64 | extern void release_sysfs_dirent(struct sysfs_dirent * sd); | 64 | extern void release_sysfs_dirent(struct sysfs_dirent * sd); |
65 | extern int sysfs_dirent_exist(struct sysfs_dirent *, const unsigned char *); | 65 | extern int sysfs_dirent_exist(struct sysfs_dirent *, const unsigned char *); |