aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/sysfs/dir.c')
-rw-r--r--fs/sysfs/dir.c10
1 files changed, 5 insertions, 5 deletions
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) {