aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/sysfs')
-rw-r--r--fs/sysfs/dir.c4
-rw-r--r--fs/sysfs/file.c9
-rw-r--r--fs/sysfs/inode.c9
-rw-r--r--fs/sysfs/symlink.c3
4 files changed, 15 insertions, 10 deletions
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index e993133aa969..158227e03b71 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -896,7 +896,9 @@ int sysfs_rename(struct sysfs_dirent *sd,
896 sd->s_name = new_name; 896 sd->s_name = new_name;
897 } 897 }
898 898
899 /* Move to the appropriate place in the appropriate directories rbtree. */ 899 /*
900 * Move to the appropriate place in the appropriate directories rbtree.
901 */
900 sysfs_unlink_sibling(sd); 902 sysfs_unlink_sibling(sd);
901 sysfs_get(new_parent_sd); 903 sysfs_get(new_parent_sd);
902 sysfs_put(sd->s_parent); 904 sysfs_put(sd->s_parent);
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 1e12e07eed5e..62bdcefbac6c 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -185,8 +185,8 @@ static int fill_write_buffer(struct sysfs_buffer *buffer,
185 * dealing with, then call the store() method for the attribute, 185 * dealing with, then call the store() method for the attribute,
186 * passing the buffer that we acquired in fill_write_buffer(). 186 * passing the buffer that we acquired in fill_write_buffer().
187 */ 187 */
188static int 188static int flush_write_buffer(struct dentry *dentry,
189flush_write_buffer(struct dentry *dentry, struct sysfs_buffer *buffer, size_t count) 189 struct sysfs_buffer *buffer, size_t count)
190{ 190{
191 struct sysfs_dirent *attr_sd = dentry->d_fsdata; 191 struct sysfs_dirent *attr_sd = dentry->d_fsdata;
192 struct kobject *kobj = attr_sd->s_parent->s_dir.kobj; 192 struct kobject *kobj = attr_sd->s_parent->s_dir.kobj;
@@ -221,9 +221,8 @@ flush_write_buffer(struct dentry *dentry, struct sysfs_buffer *buffer, size_t co
221 * Hint: if you're writing a value, first read the file, modify only the 221 * Hint: if you're writing a value, first read the file, modify only the
222 * the value you're changing, then write entire buffer back. 222 * the value you're changing, then write entire buffer back.
223 */ 223 */
224 224static ssize_t sysfs_write_file(struct file *file, const char __user *buf,
225static ssize_t 225 size_t count, loff_t *ppos)
226sysfs_write_file(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
227{ 226{
228 struct sysfs_buffer *buffer = file->private_data; 227 struct sysfs_buffer *buffer = file->private_data;
229 ssize_t len; 228 ssize_t len;
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index 833ec9150650..963f910c8034 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -128,7 +128,8 @@ out:
128 return error; 128 return error;
129} 129}
130 130
131static int sysfs_sd_setsecdata(struct sysfs_dirent *sd, void **secdata, u32 *secdata_len) 131static int sysfs_sd_setsecdata(struct sysfs_dirent *sd, void **secdata,
132 u32 *secdata_len)
132{ 133{
133 struct sysfs_inode_attrs *iattrs; 134 struct sysfs_inode_attrs *iattrs;
134 void *old_secdata; 135 void *old_secdata;
@@ -220,7 +221,8 @@ static void sysfs_refresh_inode(struct sysfs_dirent *sd, struct inode *inode)
220 set_nlink(inode, sd->s_dir.subdirs + 2); 221 set_nlink(inode, sd->s_dir.subdirs + 2);
221} 222}
222 223
223int sysfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) 224int sysfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
225 struct kstat *stat)
224{ 226{
225 struct sysfs_dirent *sd = dentry->d_fsdata; 227 struct sysfs_dirent *sd = dentry->d_fsdata;
226 struct inode *inode = dentry->d_inode; 228 struct inode *inode = dentry->d_inode;
@@ -312,7 +314,8 @@ void sysfs_evict_inode(struct inode *inode)
312 sysfs_put(sd); 314 sysfs_put(sd);
313} 315}
314 316
315int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const void *ns, const char *name) 317int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const void *ns,
318 const char *name)
316{ 319{
317 struct sysfs_addrm_cxt acxt; 320 struct sysfs_addrm_cxt acxt;
318 struct sysfs_dirent *sd; 321 struct sysfs_dirent *sd;
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c
index c6d815653125..2dd4507d9edd 100644
--- a/fs/sysfs/symlink.c
+++ b/fs/sysfs/symlink.c
@@ -305,7 +305,8 @@ static void *sysfs_follow_link(struct dentry *dentry, struct nameidata *nd)
305 return NULL; 305 return NULL;
306} 306}
307 307
308static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) 308static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd,
309 void *cookie)
309{ 310{
310 char *page = nd_get_link(nd); 311 char *page = nd_get_link(nd);
311 if (!IS_ERR(page)) 312 if (!IS_ERR(page))