aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/sysfs/bin.c14
-rw-r--r--fs/sysfs/dir.c10
-rw-r--r--fs/sysfs/file.c16
3 files changed, 20 insertions, 20 deletions
diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c
index 98022e41cda1..e8f540d38d48 100644
--- a/fs/sysfs/bin.c
+++ b/fs/sysfs/bin.c
@@ -35,7 +35,7 @@ static ssize_t
35read(struct file * file, char __user * userbuf, size_t count, loff_t * off) 35read(struct file * file, char __user * userbuf, size_t count, loff_t * off)
36{ 36{
37 char *buffer = file->private_data; 37 char *buffer = file->private_data;
38 struct dentry *dentry = file->f_dentry; 38 struct dentry *dentry = file->f_path.dentry;
39 int size = dentry->d_inode->i_size; 39 int size = dentry->d_inode->i_size;
40 loff_t offs = *off; 40 loff_t offs = *off;
41 int ret; 41 int ret;
@@ -81,7 +81,7 @@ static ssize_t write(struct file * file, const char __user * userbuf,
81 size_t count, loff_t * off) 81 size_t count, loff_t * off)
82{ 82{
83 char *buffer = file->private_data; 83 char *buffer = file->private_data;
84 struct dentry *dentry = file->f_dentry; 84 struct dentry *dentry = file->f_path.dentry;
85 int size = dentry->d_inode->i_size; 85 int size = dentry->d_inode->i_size;
86 loff_t offs = *off; 86 loff_t offs = *off;
87 87
@@ -105,7 +105,7 @@ static ssize_t write(struct file * file, const char __user * userbuf,
105 105
106static int mmap(struct file *file, struct vm_area_struct *vma) 106static int mmap(struct file *file, struct vm_area_struct *vma)
107{ 107{
108 struct dentry *dentry = file->f_dentry; 108 struct dentry *dentry = file->f_path.dentry;
109 struct bin_attribute *attr = to_bin_attr(dentry); 109 struct bin_attribute *attr = to_bin_attr(dentry);
110 struct kobject *kobj = to_kobj(dentry->d_parent); 110 struct kobject *kobj = to_kobj(dentry->d_parent);
111 111
@@ -117,8 +117,8 @@ static int mmap(struct file *file, struct vm_area_struct *vma)
117 117
118static int open(struct inode * inode, struct file * file) 118static int open(struct inode * inode, struct file * file)
119{ 119{
120 struct kobject *kobj = sysfs_get_kobject(file->f_dentry->d_parent); 120 struct kobject *kobj = sysfs_get_kobject(file->f_path.dentry->d_parent);
121 struct bin_attribute * attr = to_bin_attr(file->f_dentry); 121 struct bin_attribute * attr = to_bin_attr(file->f_path.dentry);
122 int error = -EINVAL; 122 int error = -EINVAL;
123 123
124 if (!kobj || !attr) 124 if (!kobj || !attr)
@@ -153,8 +153,8 @@ static int open(struct inode * inode, struct file * file)
153 153
154static int release(struct inode * inode, struct file * file) 154static int release(struct inode * inode, struct file * file)
155{ 155{
156 struct kobject * kobj = to_kobj(file->f_dentry->d_parent); 156 struct kobject * kobj = to_kobj(file->f_path.dentry->d_parent);
157 struct bin_attribute * attr = to_bin_attr(file->f_dentry); 157 struct bin_attribute * attr = to_bin_attr(file->f_path.dentry);
158 u8 * buffer = file->private_data; 158 u8 * buffer = file->private_data;
159 159
160 if (kobj) 160 if (kobj)
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index a5782e8c7f07..511edef8b321 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -419,7 +419,7 @@ out:
419 419
420static int sysfs_dir_open(struct inode *inode, struct file *file) 420static int sysfs_dir_open(struct inode *inode, struct file *file)
421{ 421{
422 struct dentry * dentry = file->f_dentry; 422 struct dentry * dentry = file->f_path.dentry;
423 struct sysfs_dirent * parent_sd = dentry->d_fsdata; 423 struct sysfs_dirent * parent_sd = dentry->d_fsdata;
424 424
425 mutex_lock(&dentry->d_inode->i_mutex); 425 mutex_lock(&dentry->d_inode->i_mutex);
@@ -432,7 +432,7 @@ static int sysfs_dir_open(struct inode *inode, struct file *file)
432 432
433static int sysfs_dir_close(struct inode *inode, struct file *file) 433static int sysfs_dir_close(struct inode *inode, struct file *file)
434{ 434{
435 struct dentry * dentry = file->f_dentry; 435 struct dentry * dentry = file->f_path.dentry;
436 struct sysfs_dirent * cursor = file->private_data; 436 struct sysfs_dirent * cursor = file->private_data;
437 437
438 mutex_lock(&dentry->d_inode->i_mutex); 438 mutex_lock(&dentry->d_inode->i_mutex);
@@ -452,7 +452,7 @@ static inline unsigned char dt_type(struct sysfs_dirent *sd)
452 452
453static int sysfs_readdir(struct file * filp, void * dirent, filldir_t filldir) 453static int sysfs_readdir(struct file * filp, void * dirent, filldir_t filldir)
454{ 454{
455 struct dentry *dentry = filp->f_dentry; 455 struct dentry *dentry = filp->f_path.dentry;
456 struct sysfs_dirent * parent_sd = dentry->d_fsdata; 456 struct sysfs_dirent * parent_sd = dentry->d_fsdata;
457 struct sysfs_dirent *cursor = filp->private_data; 457 struct sysfs_dirent *cursor = filp->private_data;
458 struct list_head *p, *q = &cursor->s_sibling; 458 struct list_head *p, *q = &cursor->s_sibling;
@@ -509,7 +509,7 @@ static int sysfs_readdir(struct file * filp, void * dirent, filldir_t filldir)
509 509
510static loff_t sysfs_dir_lseek(struct file * file, loff_t offset, int origin) 510static loff_t sysfs_dir_lseek(struct file * file, loff_t offset, int origin)
511{ 511{
512 struct dentry * dentry = file->f_dentry; 512 struct dentry * dentry = file->f_path.dentry;
513 513
514 mutex_lock(&dentry->d_inode->i_mutex); 514 mutex_lock(&dentry->d_inode->i_mutex);
515 switch (origin) { 515 switch (origin) {
@@ -519,7 +519,7 @@ static loff_t sysfs_dir_lseek(struct file * file, loff_t offset, int origin)
519 if (offset >= 0) 519 if (offset >= 0)
520 break; 520 break;
521 default: 521 default:
522 mutex_unlock(&file->f_dentry->d_inode->i_mutex); 522 mutex_unlock(&file->f_path.dentry->d_inode->i_mutex);
523 return -EINVAL; 523 return -EINVAL;
524 } 524 }
525 if (offset != file->f_pos) { 525 if (offset != file->f_pos) {
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 95c165101c98..9cfe53e1e00d 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -154,7 +154,7 @@ sysfs_read_file(struct file *file, char __user *buf, size_t count, loff_t *ppos)
154 154
155 down(&buffer->sem); 155 down(&buffer->sem);
156 if (buffer->needs_read_fill) { 156 if (buffer->needs_read_fill) {
157 if ((retval = fill_read_buffer(file->f_dentry,buffer))) 157 if ((retval = fill_read_buffer(file->f_path.dentry,buffer)))
158 goto out; 158 goto out;
159 } 159 }
160 pr_debug("%s: count = %zd, ppos = %lld, buf = %s\n", 160 pr_debug("%s: count = %zd, ppos = %lld, buf = %s\n",
@@ -245,7 +245,7 @@ sysfs_write_file(struct file *file, const char __user *buf, size_t count, loff_t
245 down(&buffer->sem); 245 down(&buffer->sem);
246 len = fill_write_buffer(buffer, buf, count); 246 len = fill_write_buffer(buffer, buf, count);
247 if (len > 0) 247 if (len > 0)
248 len = flush_write_buffer(file->f_dentry, buffer, len); 248 len = flush_write_buffer(file->f_path.dentry, buffer, len);
249 if (len > 0) 249 if (len > 0)
250 *ppos += len; 250 *ppos += len;
251 up(&buffer->sem); 251 up(&buffer->sem);
@@ -254,8 +254,8 @@ sysfs_write_file(struct file *file, const char __user *buf, size_t count, loff_t
254 254
255static int check_perm(struct inode * inode, struct file * file) 255static int check_perm(struct inode * inode, struct file * file)
256{ 256{
257 struct kobject *kobj = sysfs_get_kobject(file->f_dentry->d_parent); 257 struct kobject *kobj = sysfs_get_kobject(file->f_path.dentry->d_parent);
258 struct attribute * attr = to_attr(file->f_dentry); 258 struct attribute * attr = to_attr(file->f_path.dentry);
259 struct sysfs_buffer * buffer; 259 struct sysfs_buffer * buffer;
260 struct sysfs_ops * ops = NULL; 260 struct sysfs_ops * ops = NULL;
261 int error = 0; 261 int error = 0;
@@ -337,8 +337,8 @@ static int sysfs_open_file(struct inode * inode, struct file * filp)
337 337
338static int sysfs_release(struct inode * inode, struct file * filp) 338static int sysfs_release(struct inode * inode, struct file * filp)
339{ 339{
340 struct kobject * kobj = to_kobj(filp->f_dentry->d_parent); 340 struct kobject * kobj = to_kobj(filp->f_path.dentry->d_parent);
341 struct attribute * attr = to_attr(filp->f_dentry); 341 struct attribute * attr = to_attr(filp->f_path.dentry);
342 struct module * owner = attr->owner; 342 struct module * owner = attr->owner;
343 struct sysfs_buffer * buffer = filp->private_data; 343 struct sysfs_buffer * buffer = filp->private_data;
344 344
@@ -372,8 +372,8 @@ static int sysfs_release(struct inode * inode, struct file * filp)
372static unsigned int sysfs_poll(struct file *filp, poll_table *wait) 372static unsigned int sysfs_poll(struct file *filp, poll_table *wait)
373{ 373{
374 struct sysfs_buffer * buffer = filp->private_data; 374 struct sysfs_buffer * buffer = filp->private_data;
375 struct kobject * kobj = to_kobj(filp->f_dentry->d_parent); 375 struct kobject * kobj = to_kobj(filp->f_path.dentry->d_parent);
376 struct sysfs_dirent * sd = filp->f_dentry->d_fsdata; 376 struct sysfs_dirent * sd = filp->f_path.dentry->d_fsdata;
377 int res = 0; 377 int res = 0;
378 378
379 poll_wait(filp, &kobj->poll, wait); 379 poll_wait(filp, &kobj->poll, wait);