diff options
Diffstat (limited to 'fs/proc/generic.c')
-rw-r--r-- | fs/proc/generic.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c index 76ddae83daa5..7dfe548a28e8 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c | |||
@@ -42,7 +42,7 @@ static ssize_t | |||
42 | __proc_file_read(struct file *file, char __user *buf, size_t nbytes, | 42 | __proc_file_read(struct file *file, char __user *buf, size_t nbytes, |
43 | loff_t *ppos) | 43 | loff_t *ppos) |
44 | { | 44 | { |
45 | struct inode * inode = file->f_path.dentry->d_inode; | 45 | struct inode * inode = file_inode(file); |
46 | char *page; | 46 | char *page; |
47 | ssize_t retval=0; | 47 | ssize_t retval=0; |
48 | int eof=0; | 48 | int eof=0; |
@@ -188,7 +188,7 @@ static ssize_t | |||
188 | proc_file_read(struct file *file, char __user *buf, size_t nbytes, | 188 | proc_file_read(struct file *file, char __user *buf, size_t nbytes, |
189 | loff_t *ppos) | 189 | loff_t *ppos) |
190 | { | 190 | { |
191 | struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); | 191 | struct proc_dir_entry *pde = PDE(file_inode(file)); |
192 | ssize_t rv = -EIO; | 192 | ssize_t rv = -EIO; |
193 | 193 | ||
194 | spin_lock(&pde->pde_unload_lock); | 194 | spin_lock(&pde->pde_unload_lock); |
@@ -209,7 +209,7 @@ static ssize_t | |||
209 | proc_file_write(struct file *file, const char __user *buffer, | 209 | proc_file_write(struct file *file, const char __user *buffer, |
210 | size_t count, loff_t *ppos) | 210 | size_t count, loff_t *ppos) |
211 | { | 211 | { |
212 | struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); | 212 | struct proc_dir_entry *pde = PDE(file_inode(file)); |
213 | ssize_t rv = -EIO; | 213 | ssize_t rv = -EIO; |
214 | 214 | ||
215 | if (pde->write_proc) { | 215 | if (pde->write_proc) { |
@@ -460,7 +460,7 @@ int proc_readdir_de(struct proc_dir_entry *de, struct file *filp, void *dirent, | |||
460 | { | 460 | { |
461 | unsigned int ino; | 461 | unsigned int ino; |
462 | int i; | 462 | int i; |
463 | struct inode *inode = filp->f_path.dentry->d_inode; | 463 | struct inode *inode = file_inode(filp); |
464 | int ret = 0; | 464 | int ret = 0; |
465 | 465 | ||
466 | ino = inode->i_ino; | 466 | ino = inode->i_ino; |
@@ -522,7 +522,7 @@ out: | |||
522 | 522 | ||
523 | int proc_readdir(struct file *filp, void *dirent, filldir_t filldir) | 523 | int proc_readdir(struct file *filp, void *dirent, filldir_t filldir) |
524 | { | 524 | { |
525 | struct inode *inode = filp->f_path.dentry->d_inode; | 525 | struct inode *inode = file_inode(filp); |
526 | 526 | ||
527 | return proc_readdir_de(PDE(inode), filp, dirent, filldir); | 527 | return proc_readdir_de(PDE(inode), filp, dirent, filldir); |
528 | } | 528 | } |