diff options
author | Josef "Jeff" Sipek <jsipek@cs.sunysb.edu> | 2006-12-08 05:36:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:28:41 -0500 |
commit | f427f5d5d6b0eb729505a2d9c0a6cad22734a74c (patch) | |
tree | d9e15c44036407c74e7ff31f083f3aef6902c0dd /fs/sysfs | |
parent | 0f7fc9e4d03987fe29f6dd4aa67e4c56eb7ecb05 (diff) |
[PATCH] sysfs: change uses of f_{dentry, vfsmnt} to use f_path
Change all the uses of f_{dentry,vfsmnt} to f_path.{dentry,mnt} in the sysfs
filesystem code.
Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/sysfs')
-rw-r--r-- | fs/sysfs/bin.c | 14 | ||||
-rw-r--r-- | fs/sysfs/dir.c | 10 | ||||
-rw-r--r-- | fs/sysfs/file.c | 16 |
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 | |||
35 | read(struct file * file, char __user * userbuf, size_t count, loff_t * off) | 35 | read(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 | ||
106 | static int mmap(struct file *file, struct vm_area_struct *vma) | 106 | static 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 | ||
118 | static int open(struct inode * inode, struct file * file) | 118 | static 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 | ||
154 | static int release(struct inode * inode, struct file * file) | 154 | static 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 | ||
420 | static int sysfs_dir_open(struct inode *inode, struct file *file) | 420 | static 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 | ||
433 | static int sysfs_dir_close(struct inode *inode, struct file *file) | 433 | static 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 | ||
453 | static int sysfs_readdir(struct file * filp, void * dirent, filldir_t filldir) | 453 | static 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 | ||
510 | static loff_t sysfs_dir_lseek(struct file * file, loff_t offset, int origin) | 510 | static 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 | ||
255 | static int check_perm(struct inode * inode, struct file * file) | 255 | static 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 | ||
338 | static int sysfs_release(struct inode * inode, struct file * filp) | 338 | static 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) | |||
372 | static unsigned int sysfs_poll(struct file *filp, poll_table *wait) | 372 | static 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); |