aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-01-23 17:07:38 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-22 23:31:31 -0500
commit496ad9aa8ef448058e36ca7a787c61f2e63f0f54 (patch)
tree8f4abde793cd7db5bb8fde6d27ebcacd0e54379a /fs/proc
parent57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff)
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/base.c38
-rw-r--r--fs/proc/generic.c10
-rw-r--r--fs/proc/inode.c14
-rw-r--r--fs/proc/nommu.c2
-rw-r--r--fs/proc/proc_net.c2
-rw-r--r--fs/proc/proc_sysctl.c4
-rw-r--r--fs/proc/task_mmu.c6
-rw-r--r--fs/proc/task_nommu.c2
8 files changed, 39 insertions, 39 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 9b43ff77a51e..760268d6cba6 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -383,7 +383,7 @@ static int lstats_open(struct inode *inode, struct file *file)
383static ssize_t lstats_write(struct file *file, const char __user *buf, 383static ssize_t lstats_write(struct file *file, const char __user *buf,
384 size_t count, loff_t *offs) 384 size_t count, loff_t *offs)
385{ 385{
386 struct task_struct *task = get_proc_task(file->f_dentry->d_inode); 386 struct task_struct *task = get_proc_task(file_inode(file));
387 387
388 if (!task) 388 if (!task)
389 return -ESRCH; 389 return -ESRCH;
@@ -602,7 +602,7 @@ static const struct inode_operations proc_def_inode_operations = {
602static ssize_t proc_info_read(struct file * file, char __user * buf, 602static ssize_t proc_info_read(struct file * file, char __user * buf,
603 size_t count, loff_t *ppos) 603 size_t count, loff_t *ppos)
604{ 604{
605 struct inode * inode = file->f_path.dentry->d_inode; 605 struct inode * inode = file_inode(file);
606 unsigned long page; 606 unsigned long page;
607 ssize_t length; 607 ssize_t length;
608 struct task_struct *task = get_proc_task(inode); 608 struct task_struct *task = get_proc_task(inode);
@@ -668,7 +668,7 @@ static const struct file_operations proc_single_file_operations = {
668 668
669static int __mem_open(struct inode *inode, struct file *file, unsigned int mode) 669static int __mem_open(struct inode *inode, struct file *file, unsigned int mode)
670{ 670{
671 struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode); 671 struct task_struct *task = get_proc_task(file_inode(file));
672 struct mm_struct *mm; 672 struct mm_struct *mm;
673 673
674 if (!task) 674 if (!task)
@@ -869,7 +869,7 @@ static const struct file_operations proc_environ_operations = {
869static ssize_t oom_adj_read(struct file *file, char __user *buf, size_t count, 869static ssize_t oom_adj_read(struct file *file, char __user *buf, size_t count,
870 loff_t *ppos) 870 loff_t *ppos)
871{ 871{
872 struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode); 872 struct task_struct *task = get_proc_task(file_inode(file));
873 char buffer[PROC_NUMBUF]; 873 char buffer[PROC_NUMBUF];
874 int oom_adj = OOM_ADJUST_MIN; 874 int oom_adj = OOM_ADJUST_MIN;
875 size_t len; 875 size_t len;
@@ -916,7 +916,7 @@ static ssize_t oom_adj_write(struct file *file, const char __user *buf,
916 goto out; 916 goto out;
917 } 917 }
918 918
919 task = get_proc_task(file->f_path.dentry->d_inode); 919 task = get_proc_task(file_inode(file));
920 if (!task) { 920 if (!task) {
921 err = -ESRCH; 921 err = -ESRCH;
922 goto out; 922 goto out;
@@ -976,7 +976,7 @@ static const struct file_operations proc_oom_adj_operations = {
976static ssize_t oom_score_adj_read(struct file *file, char __user *buf, 976static ssize_t oom_score_adj_read(struct file *file, char __user *buf,
977 size_t count, loff_t *ppos) 977 size_t count, loff_t *ppos)
978{ 978{
979 struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode); 979 struct task_struct *task = get_proc_task(file_inode(file));
980 char buffer[PROC_NUMBUF]; 980 char buffer[PROC_NUMBUF];
981 short oom_score_adj = OOM_SCORE_ADJ_MIN; 981 short oom_score_adj = OOM_SCORE_ADJ_MIN;
982 unsigned long flags; 982 unsigned long flags;
@@ -1019,7 +1019,7 @@ static ssize_t oom_score_adj_write(struct file *file, const char __user *buf,
1019 goto out; 1019 goto out;
1020 } 1020 }
1021 1021
1022 task = get_proc_task(file->f_path.dentry->d_inode); 1022 task = get_proc_task(file_inode(file));
1023 if (!task) { 1023 if (!task) {
1024 err = -ESRCH; 1024 err = -ESRCH;
1025 goto out; 1025 goto out;
@@ -1067,7 +1067,7 @@ static const struct file_operations proc_oom_score_adj_operations = {
1067static ssize_t proc_loginuid_read(struct file * file, char __user * buf, 1067static ssize_t proc_loginuid_read(struct file * file, char __user * buf,
1068 size_t count, loff_t *ppos) 1068 size_t count, loff_t *ppos)
1069{ 1069{
1070 struct inode * inode = file->f_path.dentry->d_inode; 1070 struct inode * inode = file_inode(file);
1071 struct task_struct *task = get_proc_task(inode); 1071 struct task_struct *task = get_proc_task(inode);
1072 ssize_t length; 1072 ssize_t length;
1073 char tmpbuf[TMPBUFLEN]; 1073 char tmpbuf[TMPBUFLEN];
@@ -1084,7 +1084,7 @@ static ssize_t proc_loginuid_read(struct file * file, char __user * buf,
1084static ssize_t proc_loginuid_write(struct file * file, const char __user * buf, 1084static ssize_t proc_loginuid_write(struct file * file, const char __user * buf,
1085 size_t count, loff_t *ppos) 1085 size_t count, loff_t *ppos)
1086{ 1086{
1087 struct inode * inode = file->f_path.dentry->d_inode; 1087 struct inode * inode = file_inode(file);
1088 char *page, *tmp; 1088 char *page, *tmp;
1089 ssize_t length; 1089 ssize_t length;
1090 uid_t loginuid; 1090 uid_t loginuid;
@@ -1142,7 +1142,7 @@ static const struct file_operations proc_loginuid_operations = {
1142static ssize_t proc_sessionid_read(struct file * file, char __user * buf, 1142static ssize_t proc_sessionid_read(struct file * file, char __user * buf,
1143 size_t count, loff_t *ppos) 1143 size_t count, loff_t *ppos)
1144{ 1144{
1145 struct inode * inode = file->f_path.dentry->d_inode; 1145 struct inode * inode = file_inode(file);
1146 struct task_struct *task = get_proc_task(inode); 1146 struct task_struct *task = get_proc_task(inode);
1147 ssize_t length; 1147 ssize_t length;
1148 char tmpbuf[TMPBUFLEN]; 1148 char tmpbuf[TMPBUFLEN];
@@ -1165,7 +1165,7 @@ static const struct file_operations proc_sessionid_operations = {
1165static ssize_t proc_fault_inject_read(struct file * file, char __user * buf, 1165static ssize_t proc_fault_inject_read(struct file * file, char __user * buf,
1166 size_t count, loff_t *ppos) 1166 size_t count, loff_t *ppos)
1167{ 1167{
1168 struct task_struct *task = get_proc_task(file->f_dentry->d_inode); 1168 struct task_struct *task = get_proc_task(file_inode(file));
1169 char buffer[PROC_NUMBUF]; 1169 char buffer[PROC_NUMBUF];
1170 size_t len; 1170 size_t len;
1171 int make_it_fail; 1171 int make_it_fail;
@@ -1197,7 +1197,7 @@ static ssize_t proc_fault_inject_write(struct file * file,
1197 make_it_fail = simple_strtol(strstrip(buffer), &end, 0); 1197 make_it_fail = simple_strtol(strstrip(buffer), &end, 0);
1198 if (*end) 1198 if (*end)
1199 return -EINVAL; 1199 return -EINVAL;
1200 task = get_proc_task(file->f_dentry->d_inode); 1200 task = get_proc_task(file_inode(file));
1201 if (!task) 1201 if (!task)
1202 return -ESRCH; 1202 return -ESRCH;
1203 task->make_it_fail = make_it_fail; 1203 task->make_it_fail = make_it_fail;
@@ -1237,7 +1237,7 @@ static ssize_t
1237sched_write(struct file *file, const char __user *buf, 1237sched_write(struct file *file, const char __user *buf,
1238 size_t count, loff_t *offset) 1238 size_t count, loff_t *offset)
1239{ 1239{
1240 struct inode *inode = file->f_path.dentry->d_inode; 1240 struct inode *inode = file_inode(file);
1241 struct task_struct *p; 1241 struct task_struct *p;
1242 1242
1243 p = get_proc_task(inode); 1243 p = get_proc_task(inode);
@@ -1288,7 +1288,7 @@ static ssize_t
1288sched_autogroup_write(struct file *file, const char __user *buf, 1288sched_autogroup_write(struct file *file, const char __user *buf,
1289 size_t count, loff_t *offset) 1289 size_t count, loff_t *offset)
1290{ 1290{
1291 struct inode *inode = file->f_path.dentry->d_inode; 1291 struct inode *inode = file_inode(file);
1292 struct task_struct *p; 1292 struct task_struct *p;
1293 char buffer[PROC_NUMBUF]; 1293 char buffer[PROC_NUMBUF];
1294 int nice; 1294 int nice;
@@ -1343,7 +1343,7 @@ static const struct file_operations proc_pid_sched_autogroup_operations = {
1343static ssize_t comm_write(struct file *file, const char __user *buf, 1343static ssize_t comm_write(struct file *file, const char __user *buf,
1344 size_t count, loff_t *offset) 1344 size_t count, loff_t *offset)
1345{ 1345{
1346 struct inode *inode = file->f_path.dentry->d_inode; 1346 struct inode *inode = file_inode(file);
1347 struct task_struct *p; 1347 struct task_struct *p;
1348 char buffer[TASK_COMM_LEN]; 1348 char buffer[TASK_COMM_LEN];
1349 1349
@@ -2146,7 +2146,7 @@ out_no_task:
2146static ssize_t proc_pid_attr_read(struct file * file, char __user * buf, 2146static ssize_t proc_pid_attr_read(struct file * file, char __user * buf,
2147 size_t count, loff_t *ppos) 2147 size_t count, loff_t *ppos)
2148{ 2148{
2149 struct inode * inode = file->f_path.dentry->d_inode; 2149 struct inode * inode = file_inode(file);
2150 char *p = NULL; 2150 char *p = NULL;
2151 ssize_t length; 2151 ssize_t length;
2152 struct task_struct *task = get_proc_task(inode); 2152 struct task_struct *task = get_proc_task(inode);
@@ -2167,7 +2167,7 @@ static ssize_t proc_pid_attr_read(struct file * file, char __user * buf,
2167static ssize_t proc_pid_attr_write(struct file * file, const char __user * buf, 2167static ssize_t proc_pid_attr_write(struct file * file, const char __user * buf,
2168 size_t count, loff_t *ppos) 2168 size_t count, loff_t *ppos)
2169{ 2169{
2170 struct inode * inode = file->f_path.dentry->d_inode; 2170 struct inode * inode = file_inode(file);
2171 char *page; 2171 char *page;
2172 ssize_t length; 2172 ssize_t length;
2173 struct task_struct *task = get_proc_task(inode); 2173 struct task_struct *task = get_proc_task(inode);
@@ -2256,7 +2256,7 @@ static const struct inode_operations proc_attr_dir_inode_operations = {
2256static ssize_t proc_coredump_filter_read(struct file *file, char __user *buf, 2256static ssize_t proc_coredump_filter_read(struct file *file, char __user *buf,
2257 size_t count, loff_t *ppos) 2257 size_t count, loff_t *ppos)
2258{ 2258{
2259 struct task_struct *task = get_proc_task(file->f_dentry->d_inode); 2259 struct task_struct *task = get_proc_task(file_inode(file));
2260 struct mm_struct *mm; 2260 struct mm_struct *mm;
2261 char buffer[PROC_NUMBUF]; 2261 char buffer[PROC_NUMBUF];
2262 size_t len; 2262 size_t len;
@@ -2308,7 +2308,7 @@ static ssize_t proc_coredump_filter_write(struct file *file,
2308 goto out_no_task; 2308 goto out_no_task;
2309 2309
2310 ret = -ESRCH; 2310 ret = -ESRCH;
2311 task = get_proc_task(file->f_dentry->d_inode); 2311 task = get_proc_task(file_inode(file));
2312 if (!task) 2312 if (!task)
2313 goto out_no_task; 2313 goto out_no_task;
2314 2314
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
188proc_file_read(struct file *file, char __user *buf, size_t nbytes, 188proc_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
209proc_file_write(struct file *file, const char __user *buffer, 209proc_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
523int proc_readdir(struct file *filp, void *dirent, filldir_t filldir) 523int 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}
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 439ae6886507..38f5c119b806 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -144,7 +144,7 @@ void pde_users_dec(struct proc_dir_entry *pde)
144 144
145static loff_t proc_reg_llseek(struct file *file, loff_t offset, int whence) 145static loff_t proc_reg_llseek(struct file *file, loff_t offset, int whence)
146{ 146{
147 struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); 147 struct proc_dir_entry *pde = PDE(file_inode(file));
148 loff_t rv = -EINVAL; 148 loff_t rv = -EINVAL;
149 loff_t (*llseek)(struct file *, loff_t, int); 149 loff_t (*llseek)(struct file *, loff_t, int);
150 150
@@ -179,7 +179,7 @@ static loff_t proc_reg_llseek(struct file *file, loff_t offset, int whence)
179 179
180static ssize_t proc_reg_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) 180static ssize_t proc_reg_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
181{ 181{
182 struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); 182 struct proc_dir_entry *pde = PDE(file_inode(file));
183 ssize_t rv = -EIO; 183 ssize_t rv = -EIO;
184 ssize_t (*read)(struct file *, char __user *, size_t, loff_t *); 184 ssize_t (*read)(struct file *, char __user *, size_t, loff_t *);
185 185
@@ -201,7 +201,7 @@ static ssize_t proc_reg_read(struct file *file, char __user *buf, size_t count,
201 201
202static ssize_t proc_reg_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) 202static ssize_t proc_reg_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
203{ 203{
204 struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); 204 struct proc_dir_entry *pde = PDE(file_inode(file));
205 ssize_t rv = -EIO; 205 ssize_t rv = -EIO;
206 ssize_t (*write)(struct file *, const char __user *, size_t, loff_t *); 206 ssize_t (*write)(struct file *, const char __user *, size_t, loff_t *);
207 207
@@ -223,7 +223,7 @@ static ssize_t proc_reg_write(struct file *file, const char __user *buf, size_t
223 223
224static unsigned int proc_reg_poll(struct file *file, struct poll_table_struct *pts) 224static unsigned int proc_reg_poll(struct file *file, struct poll_table_struct *pts)
225{ 225{
226 struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); 226 struct proc_dir_entry *pde = PDE(file_inode(file));
227 unsigned int rv = DEFAULT_POLLMASK; 227 unsigned int rv = DEFAULT_POLLMASK;
228 unsigned int (*poll)(struct file *, struct poll_table_struct *); 228 unsigned int (*poll)(struct file *, struct poll_table_struct *);
229 229
@@ -245,7 +245,7 @@ static unsigned int proc_reg_poll(struct file *file, struct poll_table_struct *p
245 245
246static long proc_reg_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 246static long proc_reg_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
247{ 247{
248 struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); 248 struct proc_dir_entry *pde = PDE(file_inode(file));
249 long rv = -ENOTTY; 249 long rv = -ENOTTY;
250 long (*ioctl)(struct file *, unsigned int, unsigned long); 250 long (*ioctl)(struct file *, unsigned int, unsigned long);
251 251
@@ -268,7 +268,7 @@ static long proc_reg_unlocked_ioctl(struct file *file, unsigned int cmd, unsigne
268#ifdef CONFIG_COMPAT 268#ifdef CONFIG_COMPAT
269static long proc_reg_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 269static long proc_reg_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
270{ 270{
271 struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); 271 struct proc_dir_entry *pde = PDE(file_inode(file));
272 long rv = -ENOTTY; 272 long rv = -ENOTTY;
273 long (*compat_ioctl)(struct file *, unsigned int, unsigned long); 273 long (*compat_ioctl)(struct file *, unsigned int, unsigned long);
274 274
@@ -291,7 +291,7 @@ static long proc_reg_compat_ioctl(struct file *file, unsigned int cmd, unsigned
291 291
292static int proc_reg_mmap(struct file *file, struct vm_area_struct *vma) 292static int proc_reg_mmap(struct file *file, struct vm_area_struct *vma)
293{ 293{
294 struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); 294 struct proc_dir_entry *pde = PDE(file_inode(file));
295 int rv = -EIO; 295 int rv = -EIO;
296 int (*mmap)(struct file *, struct vm_area_struct *); 296 int (*mmap)(struct file *, struct vm_area_struct *);
297 297
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
index b1822dde55c2..ccfd99bd1c5a 100644
--- a/fs/proc/nommu.c
+++ b/fs/proc/nommu.c
@@ -45,7 +45,7 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
45 file = region->vm_file; 45 file = region->vm_file;
46 46
47 if (file) { 47 if (file) {
48 struct inode *inode = region->vm_file->f_path.dentry->d_inode; 48 struct inode *inode = file_inode(region->vm_file);
49 dev = inode->i_sb->s_dev; 49 dev = inode->i_sb->s_dev;
50 ino = inode->i_ino; 50 ino = inode->i_ino;
51 } 51 }
diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c
index fe72cd073dea..75df0d731110 100644
--- a/fs/proc/proc_net.c
+++ b/fs/proc/proc_net.c
@@ -163,7 +163,7 @@ static int proc_tgid_net_readdir(struct file *filp, void *dirent,
163 struct net *net; 163 struct net *net;
164 164
165 ret = -EINVAL; 165 ret = -EINVAL;
166 net = get_proc_task_net(filp->f_path.dentry->d_inode); 166 net = get_proc_task_net(file_inode(filp));
167 if (net != NULL) { 167 if (net != NULL) {
168 ret = proc_readdir_de(net->proc_net, filp, dirent, filldir); 168 ret = proc_readdir_de(net->proc_net, filp, dirent, filldir);
169 put_net(net); 169 put_net(net);
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index 1827d88ad58b..612df79cc6a1 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -478,7 +478,7 @@ out:
478static ssize_t proc_sys_call_handler(struct file *filp, void __user *buf, 478static ssize_t proc_sys_call_handler(struct file *filp, void __user *buf,
479 size_t count, loff_t *ppos, int write) 479 size_t count, loff_t *ppos, int write)
480{ 480{
481 struct inode *inode = filp->f_path.dentry->d_inode; 481 struct inode *inode = file_inode(filp);
482 struct ctl_table_header *head = grab_header(inode); 482 struct ctl_table_header *head = grab_header(inode);
483 struct ctl_table *table = PROC_I(inode)->sysctl_entry; 483 struct ctl_table *table = PROC_I(inode)->sysctl_entry;
484 ssize_t error; 484 ssize_t error;
@@ -542,7 +542,7 @@ static int proc_sys_open(struct inode *inode, struct file *filp)
542 542
543static unsigned int proc_sys_poll(struct file *filp, poll_table *wait) 543static unsigned int proc_sys_poll(struct file *filp, poll_table *wait)
544{ 544{
545 struct inode *inode = filp->f_path.dentry->d_inode; 545 struct inode *inode = file_inode(filp);
546 struct ctl_table_header *head = grab_header(inode); 546 struct ctl_table_header *head = grab_header(inode);
547 struct ctl_table *table = PROC_I(inode)->sysctl_entry; 547 struct ctl_table *table = PROC_I(inode)->sysctl_entry;
548 unsigned int ret = DEFAULT_POLLMASK; 548 unsigned int ret = DEFAULT_POLLMASK;
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index ca5ce7f9f800..3e636d864d56 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -271,7 +271,7 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
271 const char *name = NULL; 271 const char *name = NULL;
272 272
273 if (file) { 273 if (file) {
274 struct inode *inode = vma->vm_file->f_path.dentry->d_inode; 274 struct inode *inode = file_inode(vma->vm_file);
275 dev = inode->i_sb->s_dev; 275 dev = inode->i_sb->s_dev;
276 ino = inode->i_ino; 276 ino = inode->i_ino;
277 pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT; 277 pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
@@ -743,7 +743,7 @@ static ssize_t clear_refs_write(struct file *file, const char __user *buf,
743 return rv; 743 return rv;
744 if (type < CLEAR_REFS_ALL || type > CLEAR_REFS_MAPPED) 744 if (type < CLEAR_REFS_ALL || type > CLEAR_REFS_MAPPED)
745 return -EINVAL; 745 return -EINVAL;
746 task = get_proc_task(file->f_path.dentry->d_inode); 746 task = get_proc_task(file_inode(file));
747 if (!task) 747 if (!task)
748 return -ESRCH; 748 return -ESRCH;
749 mm = get_task_mm(task); 749 mm = get_task_mm(task);
@@ -1015,7 +1015,7 @@ static int pagemap_hugetlb_range(pte_t *pte, unsigned long hmask,
1015static ssize_t pagemap_read(struct file *file, char __user *buf, 1015static ssize_t pagemap_read(struct file *file, char __user *buf,
1016 size_t count, loff_t *ppos) 1016 size_t count, loff_t *ppos)
1017{ 1017{
1018 struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode); 1018 struct task_struct *task = get_proc_task(file_inode(file));
1019 struct mm_struct *mm; 1019 struct mm_struct *mm;
1020 struct pagemapread pm; 1020 struct pagemapread pm;
1021 int ret = -ESRCH; 1021 int ret = -ESRCH;
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
index 1ccfa537f5f5..56123a6f462e 100644
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -149,7 +149,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
149 file = vma->vm_file; 149 file = vma->vm_file;
150 150
151 if (file) { 151 if (file) {
152 struct inode *inode = vma->vm_file->f_path.dentry->d_inode; 152 struct inode *inode = file_inode(vma->vm_file);
153 dev = inode->i_sb->s_dev; 153 dev = inode->i_sb->s_dev;
154 ino = inode->i_ino; 154 ino = inode->i_ino;
155 pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT; 155 pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;