aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/sysfs')
-rw-r--r--fs/sysfs/inode.c5
-rw-r--r--fs/sysfs/mount.c4
-rw-r--r--fs/sysfs/sysfs.h1
3 files changed, 10 insertions, 0 deletions
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index c4ef945d39c8..d9262f74f94e 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -37,6 +37,11 @@ static const struct inode_operations sysfs_inode_operations ={
37 .setattr = sysfs_setattr, 37 .setattr = sysfs_setattr,
38}; 38};
39 39
40int __init sysfs_inode_init(void)
41{
42 return bdi_init(&sysfs_backing_dev_info);
43}
44
40int sysfs_setattr(struct dentry * dentry, struct iattr * iattr) 45int sysfs_setattr(struct dentry * dentry, struct iattr * iattr)
41{ 46{
42 struct inode * inode = dentry->d_inode; 47 struct inode * inode = dentry->d_inode;
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
index c76c540be3c8..74168266cd59 100644
--- a/fs/sysfs/mount.c
+++ b/fs/sysfs/mount.c
@@ -92,6 +92,10 @@ int __init sysfs_init(void)
92 if (!sysfs_dir_cachep) 92 if (!sysfs_dir_cachep)
93 goto out; 93 goto out;
94 94
95 err = sysfs_inode_init();
96 if (err)
97 goto out_err;
98
95 err = register_filesystem(&sysfs_fs_type); 99 err = register_filesystem(&sysfs_fs_type);
96 if (!err) { 100 if (!err) {
97 sysfs_mount = kern_mount(&sysfs_fs_type); 101 sysfs_mount = kern_mount(&sysfs_fs_type);
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
index f0326f281d1c..f8417988f6b0 100644
--- a/fs/sysfs/sysfs.h
+++ b/fs/sysfs/sysfs.h
@@ -146,6 +146,7 @@ static inline void sysfs_put(struct sysfs_dirent *sd)
146struct inode *sysfs_get_inode(struct sysfs_dirent *sd); 146struct inode *sysfs_get_inode(struct sysfs_dirent *sd);
147int sysfs_setattr(struct dentry *dentry, struct iattr *iattr); 147int sysfs_setattr(struct dentry *dentry, struct iattr *iattr);
148int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const char *name); 148int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const char *name);
149int sysfs_inode_init(void);
149 150
150/* 151/*
151 * file.c 152 * file.c