mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
mm: bdi init hooks
provide BDI constructor/destructor hooks [[email protected]: compile fix] Signed-off-by: Peter Zijlstra <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
dc62a30e27
commit
e0bf68ddec
19 changed files with 131 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue