aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
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/base.c
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/base.c')
-rw-r--r--fs/proc/base.c36
1 files changed, 18 insertions, 18 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;