Loading fs/sysfs/dir.c +3 −1 Original line number Diff line number Diff line Loading @@ -896,7 +896,9 @@ int sysfs_rename(struct sysfs_dirent *sd, sd->s_name = new_name; } /* Move to the appropriate place in the appropriate directories rbtree. */ /* * Move to the appropriate place in the appropriate directories rbtree. */ sysfs_unlink_sibling(sd); sysfs_get(new_parent_sd); sysfs_put(sd->s_parent); Loading fs/sysfs/file.c +4 −5 Original line number Diff line number Diff line Loading @@ -185,8 +185,8 @@ static int fill_write_buffer(struct sysfs_buffer *buffer, * dealing with, then call the store() method for the attribute, * passing the buffer that we acquired in fill_write_buffer(). */ static int flush_write_buffer(struct dentry *dentry, struct sysfs_buffer *buffer, size_t count) static int flush_write_buffer(struct dentry *dentry, struct sysfs_buffer *buffer, size_t count) { struct sysfs_dirent *attr_sd = dentry->d_fsdata; struct kobject *kobj = attr_sd->s_parent->s_dir.kobj; Loading Loading @@ -221,9 +221,8 @@ flush_write_buffer(struct dentry *dentry, struct sysfs_buffer *buffer, size_t co * Hint: if you're writing a value, first read the file, modify only the * the value you're changing, then write entire buffer back. */ static ssize_t sysfs_write_file(struct file *file, const char __user *buf, size_t count, loff_t *ppos) static ssize_t sysfs_write_file(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { struct sysfs_buffer *buffer = file->private_data; ssize_t len; Loading fs/sysfs/inode.c +6 −3 Original line number Diff line number Diff line Loading @@ -128,7 +128,8 @@ int sysfs_setattr(struct dentry *dentry, struct iattr *iattr) return error; } static int sysfs_sd_setsecdata(struct sysfs_dirent *sd, void **secdata, u32 *secdata_len) static int sysfs_sd_setsecdata(struct sysfs_dirent *sd, void **secdata, u32 *secdata_len) { struct sysfs_inode_attrs *iattrs; void *old_secdata; Loading Loading @@ -220,7 +221,8 @@ static void sysfs_refresh_inode(struct sysfs_dirent *sd, struct inode *inode) set_nlink(inode, sd->s_dir.subdirs + 2); } int sysfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) int sysfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) { struct sysfs_dirent *sd = dentry->d_fsdata; struct inode *inode = dentry->d_inode; Loading Loading @@ -312,7 +314,8 @@ void sysfs_evict_inode(struct inode *inode) sysfs_put(sd); } int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const void *ns, const char *name) int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const void *ns, const char *name) { struct sysfs_addrm_cxt acxt; struct sysfs_dirent *sd; Loading fs/sysfs/symlink.c +2 −1 Original line number Diff line number Diff line Loading @@ -305,7 +305,8 @@ static void *sysfs_follow_link(struct dentry *dentry, struct nameidata *nd) return NULL; } static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) { char *page = nd_get_link(nd); if (!IS_ERR(page)) Loading Loading
fs/sysfs/dir.c +3 −1 Original line number Diff line number Diff line Loading @@ -896,7 +896,9 @@ int sysfs_rename(struct sysfs_dirent *sd, sd->s_name = new_name; } /* Move to the appropriate place in the appropriate directories rbtree. */ /* * Move to the appropriate place in the appropriate directories rbtree. */ sysfs_unlink_sibling(sd); sysfs_get(new_parent_sd); sysfs_put(sd->s_parent); Loading
fs/sysfs/file.c +4 −5 Original line number Diff line number Diff line Loading @@ -185,8 +185,8 @@ static int fill_write_buffer(struct sysfs_buffer *buffer, * dealing with, then call the store() method for the attribute, * passing the buffer that we acquired in fill_write_buffer(). */ static int flush_write_buffer(struct dentry *dentry, struct sysfs_buffer *buffer, size_t count) static int flush_write_buffer(struct dentry *dentry, struct sysfs_buffer *buffer, size_t count) { struct sysfs_dirent *attr_sd = dentry->d_fsdata; struct kobject *kobj = attr_sd->s_parent->s_dir.kobj; Loading Loading @@ -221,9 +221,8 @@ flush_write_buffer(struct dentry *dentry, struct sysfs_buffer *buffer, size_t co * Hint: if you're writing a value, first read the file, modify only the * the value you're changing, then write entire buffer back. */ static ssize_t sysfs_write_file(struct file *file, const char __user *buf, size_t count, loff_t *ppos) static ssize_t sysfs_write_file(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { struct sysfs_buffer *buffer = file->private_data; ssize_t len; Loading
fs/sysfs/inode.c +6 −3 Original line number Diff line number Diff line Loading @@ -128,7 +128,8 @@ int sysfs_setattr(struct dentry *dentry, struct iattr *iattr) return error; } static int sysfs_sd_setsecdata(struct sysfs_dirent *sd, void **secdata, u32 *secdata_len) static int sysfs_sd_setsecdata(struct sysfs_dirent *sd, void **secdata, u32 *secdata_len) { struct sysfs_inode_attrs *iattrs; void *old_secdata; Loading Loading @@ -220,7 +221,8 @@ static void sysfs_refresh_inode(struct sysfs_dirent *sd, struct inode *inode) set_nlink(inode, sd->s_dir.subdirs + 2); } int sysfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) int sysfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) { struct sysfs_dirent *sd = dentry->d_fsdata; struct inode *inode = dentry->d_inode; Loading Loading @@ -312,7 +314,8 @@ void sysfs_evict_inode(struct inode *inode) sysfs_put(sd); } int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const void *ns, const char *name) int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const void *ns, const char *name) { struct sysfs_addrm_cxt acxt; struct sysfs_dirent *sd; Loading
fs/sysfs/symlink.c +2 −1 Original line number Diff line number Diff line Loading @@ -305,7 +305,8 @@ static void *sysfs_follow_link(struct dentry *dentry, struct nameidata *nd) return NULL; } static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) { char *page = nd_get_link(nd); if (!IS_ERR(page)) Loading