18 #include <linux/capability.h>
19 #include <linux/errno.h>
20 #include <linux/sched.h>
21 #include <linux/slab.h>
23 #include <linux/xattr.h>
50 return bdi_init(&sysfs_backing_dev_info);
82 sd_attrs = sysfs_init_inode_attrs(sd);
133 static int sysfs_sd_setsecdata(
struct sysfs_dirent *sd,
void **secdata,
u32 *secdata_len)
137 size_t old_secdata_len;
140 sd->
s_iattr = sysfs_init_inode_attrs(sd);
152 *secdata = old_secdata;
153 *secdata_len = old_secdata_len;
175 &secdata, &secdata_len);
180 error = sysfs_sd_setsecdata(sd, &secdata, &secdata_len);
215 set_inode_attr(inode, &iattrs->
ia_iattr);
228 struct inode *inode = dentry->
d_inode;
231 sysfs_refresh_inode(sd, inode);
238 static void sysfs_init_inode(
struct sysfs_dirent *sd,
struct inode *inode)
244 inode->
i_mapping->backing_dev_info = &sysfs_backing_dev_info;
245 inode->
i_op = &sysfs_inode_operations;
247 set_default_inode_attr(inode, sd->
s_mode);
248 sysfs_refresh_inode(sd, inode);
251 switch (sysfs_type(sd)) {
296 sysfs_init_inode(sd, inode);
352 sysfs_refresh_inode(sd, inode);