aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorJosef "Jeff" Sipek <jsipek@cs.sunysb.edu>2006-12-08 05:36:36 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:28:41 -0500
commit2fddfeefeed703b7638af97aa3048f82a2d53b03 (patch)
treea58e1f032b3754d4c55556578a96a32a6f1715ee /fs/proc
parentf427f5d5d6b0eb729505a2d9c0a6cad22734a74c (diff)
[PATCH] proc: 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 proc 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/proc')
-rw-r--r--fs/proc/base.c36
-rw-r--r--fs/proc/generic.c10
-rw-r--r--fs/proc/nommu.c4
-rw-r--r--fs/proc/task_mmu.c8
-rw-r--r--fs/proc/task_nommu.c4
5 files changed, 31 insertions, 31 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index b859fc749c07..a71f1755bb57 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -472,7 +472,7 @@ static struct file_operations proc_mountstats_operations = {
472static ssize_t proc_info_read(struct file * file, char __user * buf, 472static ssize_t proc_info_read(struct file * file, char __user * buf,
473 size_t count, loff_t *ppos) 473 size_t count, loff_t *ppos)
474{ 474{
475 struct inode * inode = file->f_dentry->d_inode; 475 struct inode * inode = file->f_path.dentry->d_inode;
476 unsigned long page; 476 unsigned long page;
477 ssize_t length; 477 ssize_t length;
478 struct task_struct *task = get_proc_task(inode); 478 struct task_struct *task = get_proc_task(inode);
@@ -512,7 +512,7 @@ static int mem_open(struct inode* inode, struct file* file)
512static ssize_t mem_read(struct file * file, char __user * buf, 512static ssize_t mem_read(struct file * file, char __user * buf,
513 size_t count, loff_t *ppos) 513 size_t count, loff_t *ppos)
514{ 514{
515 struct task_struct *task = get_proc_task(file->f_dentry->d_inode); 515 struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode);
516 char *page; 516 char *page;
517 unsigned long src = *ppos; 517 unsigned long src = *ppos;
518 int ret = -ESRCH; 518 int ret = -ESRCH;
@@ -584,7 +584,7 @@ static ssize_t mem_write(struct file * file, const char * buf,
584{ 584{
585 int copied; 585 int copied;
586 char *page; 586 char *page;
587 struct task_struct *task = get_proc_task(file->f_dentry->d_inode); 587 struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode);
588 unsigned long dst = *ppos; 588 unsigned long dst = *ppos;
589 589
590 copied = -ESRCH; 590 copied = -ESRCH;
@@ -654,7 +654,7 @@ static struct file_operations proc_mem_operations = {
654static ssize_t oom_adjust_read(struct file *file, char __user *buf, 654static ssize_t oom_adjust_read(struct file *file, char __user *buf,
655 size_t count, loff_t *ppos) 655 size_t count, loff_t *ppos)
656{ 656{
657 struct task_struct *task = get_proc_task(file->f_dentry->d_inode); 657 struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode);
658 char buffer[PROC_NUMBUF]; 658 char buffer[PROC_NUMBUF];
659 size_t len; 659 size_t len;
660 int oom_adjust; 660 int oom_adjust;
@@ -694,7 +694,7 @@ static ssize_t oom_adjust_write(struct file *file, const char __user *buf,
694 return -EINVAL; 694 return -EINVAL;
695 if (*end == '\n') 695 if (*end == '\n')
696 end++; 696 end++;
697 task = get_proc_task(file->f_dentry->d_inode); 697 task = get_proc_task(file->f_path.dentry->d_inode);
698 if (!task) 698 if (!task)
699 return -ESRCH; 699 return -ESRCH;
700 if (oom_adjust < task->oomkilladj && !capable(CAP_SYS_RESOURCE)) { 700 if (oom_adjust < task->oomkilladj && !capable(CAP_SYS_RESOURCE)) {
@@ -718,7 +718,7 @@ static struct file_operations proc_oom_adjust_operations = {
718static ssize_t proc_loginuid_read(struct file * file, char __user * buf, 718static ssize_t proc_loginuid_read(struct file * file, char __user * buf,
719 size_t count, loff_t *ppos) 719 size_t count, loff_t *ppos)
720{ 720{
721 struct inode * inode = file->f_dentry->d_inode; 721 struct inode * inode = file->f_path.dentry->d_inode;
722 struct task_struct *task = get_proc_task(inode); 722 struct task_struct *task = get_proc_task(inode);
723 ssize_t length; 723 ssize_t length;
724 char tmpbuf[TMPBUFLEN]; 724 char tmpbuf[TMPBUFLEN];
@@ -734,7 +734,7 @@ static ssize_t proc_loginuid_read(struct file * file, char __user * buf,
734static ssize_t proc_loginuid_write(struct file * file, const char __user * buf, 734static ssize_t proc_loginuid_write(struct file * file, const char __user * buf,
735 size_t count, loff_t *ppos) 735 size_t count, loff_t *ppos)
736{ 736{
737 struct inode * inode = file->f_dentry->d_inode; 737 struct inode * inode = file->f_path.dentry->d_inode;
738 char *page, *tmp; 738 char *page, *tmp;
739 ssize_t length; 739 ssize_t length;
740 uid_t loginuid; 740 uid_t loginuid;
@@ -1078,7 +1078,7 @@ static int proc_fill_cache(struct file *filp, void *dirent, filldir_t filldir,
1078 char *name, int len, 1078 char *name, int len,
1079 instantiate_t instantiate, struct task_struct *task, void *ptr) 1079 instantiate_t instantiate, struct task_struct *task, void *ptr)
1080{ 1080{
1081 struct dentry *child, *dir = filp->f_dentry; 1081 struct dentry *child, *dir = filp->f_path.dentry;
1082 struct inode *inode; 1082 struct inode *inode;
1083 struct qstr qname; 1083 struct qstr qname;
1084 ino_t ino = 0; 1084 ino_t ino = 0;
@@ -1157,8 +1157,8 @@ static int proc_fd_link(struct inode *inode, struct dentry **dentry, struct vfsm
1157 spin_lock(&files->file_lock); 1157 spin_lock(&files->file_lock);
1158 file = fcheck_files(files, fd); 1158 file = fcheck_files(files, fd);
1159 if (file) { 1159 if (file) {
1160 *mnt = mntget(file->f_vfsmnt); 1160 *mnt = mntget(file->f_path.mnt);
1161 *dentry = dget(file->f_dentry); 1161 *dentry = dget(file->f_path.dentry);
1162 spin_unlock(&files->file_lock); 1162 spin_unlock(&files->file_lock);
1163 put_files_struct(files); 1163 put_files_struct(files);
1164 return 0; 1164 return 0;
@@ -1293,7 +1293,7 @@ static int proc_fd_fill_cache(struct file *filp, void *dirent, filldir_t filldir
1293 1293
1294static int proc_readfd(struct file * filp, void * dirent, filldir_t filldir) 1294static int proc_readfd(struct file * filp, void * dirent, filldir_t filldir)
1295{ 1295{
1296 struct dentry *dentry = filp->f_dentry; 1296 struct dentry *dentry = filp->f_path.dentry;
1297 struct inode *inode = dentry->d_inode; 1297 struct inode *inode = dentry->d_inode;
1298 struct task_struct *p = get_proc_task(inode); 1298 struct task_struct *p = get_proc_task(inode);
1299 unsigned int fd, tid, ino; 1299 unsigned int fd, tid, ino;
@@ -1440,7 +1440,7 @@ static int proc_pident_readdir(struct file *filp,
1440{ 1440{
1441 int i; 1441 int i;
1442 int pid; 1442 int pid;
1443 struct dentry *dentry = filp->f_dentry; 1443 struct dentry *dentry = filp->f_path.dentry;
1444 struct inode *inode = dentry->d_inode; 1444 struct inode *inode = dentry->d_inode;
1445 struct task_struct *task = get_proc_task(inode); 1445 struct task_struct *task = get_proc_task(inode);
1446 struct pid_entry *p, *last; 1446 struct pid_entry *p, *last;
@@ -1496,7 +1496,7 @@ out_no_task:
1496static ssize_t proc_pid_attr_read(struct file * file, char __user * buf, 1496static ssize_t proc_pid_attr_read(struct file * file, char __user * buf,
1497 size_t count, loff_t *ppos) 1497 size_t count, loff_t *ppos)
1498{ 1498{
1499 struct inode * inode = file->f_dentry->d_inode; 1499 struct inode * inode = file->f_path.dentry->d_inode;
1500 unsigned long page; 1500 unsigned long page;
1501 ssize_t length; 1501 ssize_t length;
1502 struct task_struct *task = get_proc_task(inode); 1502 struct task_struct *task = get_proc_task(inode);
@@ -1512,7 +1512,7 @@ static ssize_t proc_pid_attr_read(struct file * file, char __user * buf,
1512 goto out; 1512 goto out;
1513 1513
1514 length = security_getprocattr(task, 1514 length = security_getprocattr(task,
1515 (char*)file->f_dentry->d_name.name, 1515 (char*)file->f_path.dentry->d_name.name,
1516 (void*)page, count); 1516 (void*)page, count);
1517 if (length >= 0) 1517 if (length >= 0)
1518 length = simple_read_from_buffer(buf, count, ppos, (char *)page, length); 1518 length = simple_read_from_buffer(buf, count, ppos, (char *)page, length);
@@ -1526,7 +1526,7 @@ out_no_task:
1526static ssize_t proc_pid_attr_write(struct file * file, const char __user * buf, 1526static ssize_t proc_pid_attr_write(struct file * file, const char __user * buf,
1527 size_t count, loff_t *ppos) 1527 size_t count, loff_t *ppos)
1528{ 1528{
1529 struct inode * inode = file->f_dentry->d_inode; 1529 struct inode * inode = file->f_path.dentry->d_inode;
1530 char *page; 1530 char *page;
1531 ssize_t length; 1531 ssize_t length;
1532 struct task_struct *task = get_proc_task(inode); 1532 struct task_struct *task = get_proc_task(inode);
@@ -1552,7 +1552,7 @@ static ssize_t proc_pid_attr_write(struct file * file, const char __user * buf,
1552 goto out_free; 1552 goto out_free;
1553 1553
1554 length = security_setprocattr(task, 1554 length = security_setprocattr(task,
1555 (char*)file->f_dentry->d_name.name, 1555 (char*)file->f_path.dentry->d_name.name,
1556 (void*)page, count); 1556 (void*)page, count);
1557out_free: 1557out_free:
1558 free_page((unsigned long) page); 1558 free_page((unsigned long) page);
@@ -1994,7 +1994,7 @@ static int proc_pid_fill_cache(struct file *filp, void *dirent, filldir_t filldi
1994int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir) 1994int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir)
1995{ 1995{
1996 unsigned int nr = filp->f_pos - FIRST_PROCESS_ENTRY; 1996 unsigned int nr = filp->f_pos - FIRST_PROCESS_ENTRY;
1997 struct task_struct *reaper = get_proc_task(filp->f_dentry->d_inode); 1997 struct task_struct *reaper = get_proc_task(filp->f_path.dentry->d_inode);
1998 struct task_struct *task; 1998 struct task_struct *task;
1999 int tgid; 1999 int tgid;
2000 2000
@@ -2235,7 +2235,7 @@ static int proc_task_fill_cache(struct file *filp, void *dirent, filldir_t filld
2235/* for the /proc/TGID/task/ directories */ 2235/* for the /proc/TGID/task/ directories */
2236static int proc_task_readdir(struct file * filp, void * dirent, filldir_t filldir) 2236static int proc_task_readdir(struct file * filp, void * dirent, filldir_t filldir)
2237{ 2237{
2238 struct dentry *dentry = filp->f_dentry; 2238 struct dentry *dentry = filp->f_path.dentry;
2239 struct inode *inode = dentry->d_inode; 2239 struct inode *inode = dentry->d_inode;
2240 struct task_struct *leader = get_proc_task(inode); 2240 struct task_struct *leader = get_proc_task(inode);
2241 struct task_struct *task; 2241 struct task_struct *task;
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index 4ba03009cf72..853cb877d5f3 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -52,7 +52,7 @@ static ssize_t
52proc_file_read(struct file *file, char __user *buf, size_t nbytes, 52proc_file_read(struct file *file, char __user *buf, size_t nbytes,
53 loff_t *ppos) 53 loff_t *ppos)
54{ 54{
55 struct inode * inode = file->f_dentry->d_inode; 55 struct inode * inode = file->f_path.dentry->d_inode;
56 char *page; 56 char *page;
57 ssize_t retval=0; 57 ssize_t retval=0;
58 int eof=0; 58 int eof=0;
@@ -203,7 +203,7 @@ static ssize_t
203proc_file_write(struct file *file, const char __user *buffer, 203proc_file_write(struct file *file, const char __user *buffer,
204 size_t count, loff_t *ppos) 204 size_t count, loff_t *ppos)
205{ 205{
206 struct inode *inode = file->f_dentry->d_inode; 206 struct inode *inode = file->f_path.dentry->d_inode;
207 struct proc_dir_entry * dp; 207 struct proc_dir_entry * dp;
208 208
209 dp = PDE(inode); 209 dp = PDE(inode);
@@ -432,7 +432,7 @@ int proc_readdir(struct file * filp,
432 struct proc_dir_entry * de; 432 struct proc_dir_entry * de;
433 unsigned int ino; 433 unsigned int ino;
434 int i; 434 int i;
435 struct inode *inode = filp->f_dentry->d_inode; 435 struct inode *inode = filp->f_path.dentry->d_inode;
436 int ret = 0; 436 int ret = 0;
437 437
438 lock_kernel(); 438 lock_kernel();
@@ -453,7 +453,7 @@ int proc_readdir(struct file * filp,
453 /* fall through */ 453 /* fall through */
454 case 1: 454 case 1:
455 if (filldir(dirent, "..", 2, i, 455 if (filldir(dirent, "..", 2, i,
456 parent_ino(filp->f_dentry), 456 parent_ino(filp->f_path.dentry),
457 DT_DIR) < 0) 457 DT_DIR) < 0)
458 goto out; 458 goto out;
459 i++; 459 i++;
@@ -558,7 +558,7 @@ static void proc_kill_inodes(struct proc_dir_entry *de)
558 file_list_lock(); 558 file_list_lock();
559 list_for_each(p, &sb->s_files) { 559 list_for_each(p, &sb->s_files) {
560 struct file * filp = list_entry(p, struct file, f_u.fu_list); 560 struct file * filp = list_entry(p, struct file, f_u.fu_list);
561 struct dentry * dentry = filp->f_dentry; 561 struct dentry * dentry = filp->f_path.dentry;
562 struct inode * inode; 562 struct inode * inode;
563 const struct file_operations *fops; 563 const struct file_operations *fops;
564 564
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
index d7dbdf9e0f49..5ec67257e5f9 100644
--- a/fs/proc/nommu.c
+++ b/fs/proc/nommu.c
@@ -46,7 +46,7 @@ int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
46 file = vma->vm_file; 46 file = vma->vm_file;
47 47
48 if (file) { 48 if (file) {
49 struct inode *inode = vma->vm_file->f_dentry->d_inode; 49 struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
50 dev = inode->i_sb->s_dev; 50 dev = inode->i_sb->s_dev;
51 ino = inode->i_ino; 51 ino = inode->i_ino;
52 } 52 }
@@ -67,7 +67,7 @@ int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
67 if (len < 1) 67 if (len < 1)
68 len = 1; 68 len = 1;
69 seq_printf(m, "%*c", len, ' '); 69 seq_printf(m, "%*c", len, ' ');
70 seq_path(m, file->f_vfsmnt, file->f_dentry, ""); 70 seq_path(m, file->f_path.mnt, file->f_path.dentry, "");
71 } 71 }
72 72
73 seq_putc(m, '\n'); 73 seq_putc(m, '\n');
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 6b769afac55a..55ade0d15621 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -94,8 +94,8 @@ int proc_exe_link(struct inode *inode, struct dentry **dentry, struct vfsmount *
94 } 94 }
95 95
96 if (vma) { 96 if (vma) {
97 *mnt = mntget(vma->vm_file->f_vfsmnt); 97 *mnt = mntget(vma->vm_file->f_path.mnt);
98 *dentry = dget(vma->vm_file->f_dentry); 98 *dentry = dget(vma->vm_file->f_path.dentry);
99 result = 0; 99 result = 0;
100 } 100 }
101 101
@@ -135,7 +135,7 @@ static int show_map_internal(struct seq_file *m, void *v, struct mem_size_stats
135 int len; 135 int len;
136 136
137 if (file) { 137 if (file) {
138 struct inode *inode = vma->vm_file->f_dentry->d_inode; 138 struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
139 dev = inode->i_sb->s_dev; 139 dev = inode->i_sb->s_dev;
140 ino = inode->i_ino; 140 ino = inode->i_ino;
141 } 141 }
@@ -156,7 +156,7 @@ static int show_map_internal(struct seq_file *m, void *v, struct mem_size_stats
156 */ 156 */
157 if (file) { 157 if (file) {
158 pad_len_spaces(m, len); 158 pad_len_spaces(m, len);
159 seq_path(m, file->f_vfsmnt, file->f_dentry, "\n"); 159 seq_path(m, file->f_path.mnt, file->f_path.dentry, "\n");
160 } else { 160 } else {
161 const char *name = arch_vma_name(vma); 161 const char *name = arch_vma_name(vma);
162 if (!name) { 162 if (!name) {
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
index 091aa8e48e02..fcc5caf93f55 100644
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -126,8 +126,8 @@ int proc_exe_link(struct inode *inode, struct dentry **dentry, struct vfsmount *
126 } 126 }
127 127
128 if (vma) { 128 if (vma) {
129 *mnt = mntget(vma->vm_file->f_vfsmnt); 129 *mnt = mntget(vma->vm_file->f_path.mnt);
130 *dentry = dget(vma->vm_file->f_dentry); 130 *dentry = dget(vma->vm_file->f_path.dentry);
131 result = 0; 131 result = 0;
132 } 132 }
133 133