From: Josef "Jeff" Sipek Change all the uses of f_{dentry,vfsmnt} to f_path.{dentry,mnt} in the proc filesystem code. Signed-off-by: Josef "Jeff" Sipek Signed-off-by: Andrew Morton --- fs/proc/base.c | 36 ++++++++++++++++++------------------ fs/proc/generic.c | 10 +++++----- fs/proc/nommu.c | 4 ++-- fs/proc/task_mmu.c | 8 ++++---- fs/proc/task_nommu.c | 4 ++-- 5 files changed, 31 insertions(+), 31 deletions(-) diff -puN fs/proc/base.c~proc-change-uses-of-f_dentry-vfsmnt-to-use-f_path fs/proc/base.c --- a/fs/proc/base.c~proc-change-uses-of-f_dentry-vfsmnt-to-use-f_path +++ a/fs/proc/base.c @@ -470,7 +470,7 @@ static struct file_operations proc_mount static ssize_t proc_info_read(struct file * file, char __user * buf, size_t count, loff_t *ppos) { - struct inode * inode = file->f_dentry->d_inode; + struct inode * inode = file->f_path.dentry->d_inode; unsigned long page; ssize_t length; struct task_struct *task = get_proc_task(inode); @@ -510,7 +510,7 @@ static int mem_open(struct inode* inode, static ssize_t mem_read(struct file * file, char __user * buf, size_t count, loff_t *ppos) { - struct task_struct *task = get_proc_task(file->f_dentry->d_inode); + struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode); char *page; unsigned long src = *ppos; int ret = -ESRCH; @@ -582,7 +582,7 @@ static ssize_t mem_write(struct file * f { int copied; char *page; - struct task_struct *task = get_proc_task(file->f_dentry->d_inode); + struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode); unsigned long dst = *ppos; copied = -ESRCH; @@ -652,7 +652,7 @@ static struct file_operations proc_mem_o static ssize_t oom_adjust_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { - struct task_struct *task = get_proc_task(file->f_dentry->d_inode); + struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode); char buffer[PROC_NUMBUF]; size_t len; int oom_adjust; @@ -692,7 +692,7 @@ static ssize_t oom_adjust_write(struct f return -EINVAL; if (*end == '\n') end++; - task = get_proc_task(file->f_dentry->d_inode); + task = get_proc_task(file->f_path.dentry->d_inode); if (!task) return -ESRCH; if (oom_adjust < task->oomkilladj && !capable(CAP_SYS_RESOURCE)) { @@ -716,7 +716,7 @@ static struct file_operations proc_oom_a static ssize_t proc_loginuid_read(struct file * file, char __user * buf, size_t count, loff_t *ppos) { - struct inode * inode = file->f_dentry->d_inode; + struct inode * inode = file->f_path.dentry->d_inode; struct task_struct *task = get_proc_task(inode); ssize_t length; char tmpbuf[TMPBUFLEN]; @@ -732,7 +732,7 @@ static ssize_t proc_loginuid_read(struct static ssize_t proc_loginuid_write(struct file * file, const char __user * buf, size_t count, loff_t *ppos) { - struct inode * inode = file->f_dentry->d_inode; + struct inode * inode = file->f_path.dentry->d_inode; char *page, *tmp; ssize_t length; uid_t loginuid; @@ -1004,7 +1004,7 @@ static int proc_fill_cache(struct file * char *name, int len, instantiate_t instantiate, struct task_struct *task, void *ptr) { - struct dentry *child, *dir = filp->f_dentry; + struct dentry *child, *dir = filp->f_path.dentry; struct inode *inode; struct qstr qname; ino_t ino = 0; @@ -1083,8 +1083,8 @@ static int proc_fd_link(struct inode *in spin_lock(&files->file_lock); file = fcheck_files(files, fd); if (file) { - *mnt = mntget(file->f_vfsmnt); - *dentry = dget(file->f_dentry); + *mnt = mntget(file->f_path.mnt); + *dentry = dget(file->f_path.dentry); spin_unlock(&files->file_lock); put_files_struct(files); return 0; @@ -1219,7 +1219,7 @@ static int proc_fd_fill_cache(struct fil static int proc_readfd(struct file * filp, void * dirent, filldir_t filldir) { - struct dentry *dentry = filp->f_dentry; + struct dentry *dentry = filp->f_path.dentry; struct inode *inode = dentry->d_inode; struct task_struct *p = get_proc_task(inode); unsigned int fd, tid, ino; @@ -1366,7 +1366,7 @@ static int proc_pident_readdir(struct fi { int i; int pid; - struct dentry *dentry = filp->f_dentry; + struct dentry *dentry = filp->f_path.dentry; struct inode *inode = dentry->d_inode; struct task_struct *task = get_proc_task(inode); struct pid_entry *p, *last; @@ -1422,7 +1422,7 @@ out_no_task: static ssize_t proc_pid_attr_read(struct file * file, char __user * buf, size_t count, loff_t *ppos) { - struct inode * inode = file->f_dentry->d_inode; + struct inode * inode = file->f_path.dentry->d_inode; unsigned long page; ssize_t length; struct task_struct *task = get_proc_task(inode); @@ -1438,7 +1438,7 @@ static ssize_t proc_pid_attr_read(struct goto out; length = security_getprocattr(task, - (char*)file->f_dentry->d_name.name, + (char*)file->f_path.dentry->d_name.name, (void*)page, count); if (length >= 0) length = simple_read_from_buffer(buf, count, ppos, (char *)page, length); @@ -1452,7 +1452,7 @@ out_no_task: static ssize_t proc_pid_attr_write(struct file * file, const char __user * buf, size_t count, loff_t *ppos) { - struct inode * inode = file->f_dentry->d_inode; + struct inode * inode = file->f_path.dentry->d_inode; char *page; ssize_t length; struct task_struct *task = get_proc_task(inode); @@ -1478,7 +1478,7 @@ static ssize_t proc_pid_attr_write(struc goto out_free; length = security_setprocattr(task, - (char*)file->f_dentry->d_name.name, + (char*)file->f_path.dentry->d_name.name, (void*)page, count); out_free: free_page((unsigned long) page); @@ -1916,7 +1916,7 @@ static int proc_pid_fill_cache(struct fi int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir) { unsigned int nr = filp->f_pos - FIRST_PROCESS_ENTRY; - struct task_struct *reaper = get_proc_task(filp->f_dentry->d_inode); + struct task_struct *reaper = get_proc_task(filp->f_path.dentry->d_inode); struct task_struct *task; int tgid; @@ -2154,7 +2154,7 @@ static int proc_task_fill_cache(struct f /* for the /proc/TGID/task/ directories */ static int proc_task_readdir(struct file * filp, void * dirent, filldir_t filldir) { - struct dentry *dentry = filp->f_dentry; + struct dentry *dentry = filp->f_path.dentry; struct inode *inode = dentry->d_inode; struct task_struct *leader = get_proc_task(inode); struct task_struct *task; diff -puN fs/proc/generic.c~proc-change-uses-of-f_dentry-vfsmnt-to-use-f_path fs/proc/generic.c --- a/fs/proc/generic.c~proc-change-uses-of-f_dentry-vfsmnt-to-use-f_path +++ a/fs/proc/generic.c @@ -52,7 +52,7 @@ static ssize_t proc_file_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) { - struct inode * inode = file->f_dentry->d_inode; + struct inode * inode = file->f_path.dentry->d_inode; char *page; ssize_t retval=0; int eof=0; @@ -203,7 +203,7 @@ static ssize_t proc_file_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) { - struct inode *inode = file->f_dentry->d_inode; + struct inode *inode = file->f_path.dentry->d_inode; struct proc_dir_entry * dp; dp = PDE(inode); @@ -432,7 +432,7 @@ int proc_readdir(struct file * filp, struct proc_dir_entry * de; unsigned int ino; int i; - struct inode *inode = filp->f_dentry->d_inode; + struct inode *inode = filp->f_path.dentry->d_inode; int ret = 0; lock_kernel(); @@ -453,7 +453,7 @@ int proc_readdir(struct file * filp, /* fall through */ case 1: if (filldir(dirent, "..", 2, i, - parent_ino(filp->f_dentry), + parent_ino(filp->f_path.dentry), DT_DIR) < 0) goto out; i++; @@ -558,7 +558,7 @@ static void proc_kill_inodes(struct proc file_list_lock(); list_for_each(p, &sb->s_files) { struct file * filp = list_entry(p, struct file, f_u.fu_list); - struct dentry * dentry = filp->f_dentry; + struct dentry * dentry = filp->f_path.dentry; struct inode * inode; const struct file_operations *fops; diff -puN fs/proc/nommu.c~proc-change-uses-of-f_dentry-vfsmnt-to-use-f_path fs/proc/nommu.c --- a/fs/proc/nommu.c~proc-change-uses-of-f_dentry-vfsmnt-to-use-f_path +++ a/fs/proc/nommu.c @@ -46,7 +46,7 @@ int nommu_vma_show(struct seq_file *m, s file = vma->vm_file; if (file) { - struct inode *inode = vma->vm_file->f_dentry->d_inode; + struct inode *inode = vma->vm_file->f_path.dentry->d_inode; dev = inode->i_sb->s_dev; ino = inode->i_ino; } @@ -67,7 +67,7 @@ int nommu_vma_show(struct seq_file *m, s if (len < 1) len = 1; seq_printf(m, "%*c", len, ' '); - seq_path(m, file->f_vfsmnt, file->f_dentry, ""); + seq_path(m, file->f_path.mnt, file->f_path.dentry, ""); } seq_putc(m, '\n'); diff -puN fs/proc/task_mmu.c~proc-change-uses-of-f_dentry-vfsmnt-to-use-f_path fs/proc/task_mmu.c --- a/fs/proc/task_mmu.c~proc-change-uses-of-f_dentry-vfsmnt-to-use-f_path +++ a/fs/proc/task_mmu.c @@ -94,8 +94,8 @@ int proc_exe_link(struct inode *inode, s } if (vma) { - *mnt = mntget(vma->vm_file->f_vfsmnt); - *dentry = dget(vma->vm_file->f_dentry); + *mnt = mntget(vma->vm_file->f_path.mnt); + *dentry = dget(vma->vm_file->f_path.dentry); result = 0; } @@ -135,7 +135,7 @@ static int show_map_internal(struct seq_ int len; if (file) { - struct inode *inode = vma->vm_file->f_dentry->d_inode; + struct inode *inode = vma->vm_file->f_path.dentry->d_inode; dev = inode->i_sb->s_dev; ino = inode->i_ino; } @@ -156,7 +156,7 @@ static int show_map_internal(struct seq_ */ if (file) { pad_len_spaces(m, len); - seq_path(m, file->f_vfsmnt, file->f_dentry, "\n"); + seq_path(m, file->f_path.mnt, file->f_path.dentry, "\n"); } else { const char *name = arch_vma_name(vma); if (!name) { diff -puN fs/proc/task_nommu.c~proc-change-uses-of-f_dentry-vfsmnt-to-use-f_path fs/proc/task_nommu.c --- a/fs/proc/task_nommu.c~proc-change-uses-of-f_dentry-vfsmnt-to-use-f_path +++ a/fs/proc/task_nommu.c @@ -126,8 +126,8 @@ int proc_exe_link(struct inode *inode, s } if (vma) { - *mnt = mntget(vma->vm_file->f_vfsmnt); - *dentry = dget(vma->vm_file->f_dentry); + *mnt = mntget(vma->vm_file->f_path.mnt); + *dentry = dget(vma->vm_file->f_path.dentry); result = 0; } _