diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2007-10-16 23:25:46 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 08:42:45 -0700 |
commit | e0bf68ddec4f4f90e5871404be4f1854c17f3120 (patch) | |
tree | 36203a3558cbe26d698bed18be69b3822fb5eef2 /fs/sysfs | |
parent | dc62a30e274d003a4d08fb888f1520add4b21373 (diff) | |
download | kernel_samsung_aries-e0bf68ddec4f4f90e5871404be4f1854c17f3120.zip kernel_samsung_aries-e0bf68ddec4f4f90e5871404be4f1854c17f3120.tar.gz kernel_samsung_aries-e0bf68ddec4f4f90e5871404be4f1854c17f3120.tar.bz2 |
mm: bdi init hooks
provide BDI constructor/destructor hooks
[akpm@linux-foundation.org: compile fix]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/sysfs')
-rw-r--r-- | fs/sysfs/inode.c | 5 | ||||
-rw-r--r-- | fs/sysfs/mount.c | 4 | ||||
-rw-r--r-- | fs/sysfs/sysfs.h | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index c4ef945..d9262f7 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c @@ -37,6 +37,11 @@ static const struct inode_operations sysfs_inode_operations ={ .setattr = sysfs_setattr, }; +int __init sysfs_inode_init(void) +{ + return bdi_init(&sysfs_backing_dev_info); +} + int sysfs_setattr(struct dentry * dentry, struct iattr * iattr) { struct inode * inode = dentry->d_inode; diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index c76c540..7416826 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c @@ -92,6 +92,10 @@ int __init sysfs_init(void) if (!sysfs_dir_cachep) goto out; + err = sysfs_inode_init(); + if (err) + goto out_err; + err = register_filesystem(&sysfs_fs_type); if (!err) { sysfs_mount = kern_mount(&sysfs_fs_type); diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h index f0326f2..f841798 100644 --- a/fs/sysfs/sysfs.h +++ b/fs/sysfs/sysfs.h @@ -146,6 +146,7 @@ static inline void sysfs_put(struct sysfs_dirent *sd) struct inode *sysfs_get_inode(struct sysfs_dirent *sd); int sysfs_setattr(struct dentry *dentry, struct iattr *iattr); int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const char *name); +int sysfs_inode_init(void); /* * file.c |