aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@openvz.org>2012-01-10 18:11:20 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-10 19:30:54 -0500
commit7773fbc54182a90cd248656619c7d33859e5f91d (patch)
tree1fe1cc91e194164c19675a588dad0efb3a8c8007 /fs/proc/base.c
parent5e6292c0f28f03dfdb8ea3d685f0b838a23bfba4 (diff)
procfs: make proc_get_link to use dentry instead of inode
Prepare the ground for the next "map_files" patch which needs a name of a link file to analyse. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Pavel Emelyanov <xemul@parallels.com> Cc: Tejun Heo <tj@kernel.org> Cc: Vasiliy Kulikov <segoon@openwall.com> Cc: "Kirill A. Shutemov" <kirill@shutemov.name> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r--fs/proc/base.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 1aab5fe05a1b..e31d95055c67 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -166,9 +166,9 @@ static int get_task_root(struct task_struct *task, struct path *root)
166 return result; 166 return result;
167} 167}
168 168
169static int proc_cwd_link(struct inode *inode, struct path *path) 169static int proc_cwd_link(struct dentry *dentry, struct path *path)
170{ 170{
171 struct task_struct *task = get_proc_task(inode); 171 struct task_struct *task = get_proc_task(dentry->d_inode);
172 int result = -ENOENT; 172 int result = -ENOENT;
173 173
174 if (task) { 174 if (task) {
@@ -183,9 +183,9 @@ static int proc_cwd_link(struct inode *inode, struct path *path)
183 return result; 183 return result;
184} 184}
185 185
186static int proc_root_link(struct inode *inode, struct path *path) 186static int proc_root_link(struct dentry *dentry, struct path *path)
187{ 187{
188 struct task_struct *task = get_proc_task(inode); 188 struct task_struct *task = get_proc_task(dentry->d_inode);
189 int result = -ENOENT; 189 int result = -ENOENT;
190 190
191 if (task) { 191 if (task) {
@@ -1456,13 +1456,13 @@ static const struct file_operations proc_pid_set_comm_operations = {
1456 .release = single_release, 1456 .release = single_release,
1457}; 1457};
1458 1458
1459static int proc_exe_link(struct inode *inode, struct path *exe_path) 1459static int proc_exe_link(struct dentry *dentry, struct path *exe_path)
1460{ 1460{
1461 struct task_struct *task; 1461 struct task_struct *task;
1462 struct mm_struct *mm; 1462 struct mm_struct *mm;
1463 struct file *exe_file; 1463 struct file *exe_file;
1464 1464
1465 task = get_proc_task(inode); 1465 task = get_proc_task(dentry->d_inode);
1466 if (!task) 1466 if (!task)
1467 return -ENOENT; 1467 return -ENOENT;
1468 mm = get_task_mm(task); 1468 mm = get_task_mm(task);
@@ -1492,7 +1492,7 @@ static void *proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd)
1492 if (!proc_fd_access_allowed(inode)) 1492 if (!proc_fd_access_allowed(inode))
1493 goto out; 1493 goto out;
1494 1494
1495 error = PROC_I(inode)->op.proc_get_link(inode, &nd->path); 1495 error = PROC_I(inode)->op.proc_get_link(dentry, &nd->path);
1496out: 1496out:
1497 return ERR_PTR(error); 1497 return ERR_PTR(error);
1498} 1498}
@@ -1531,7 +1531,7 @@ static int proc_pid_readlink(struct dentry * dentry, char __user * buffer, int b
1531 if (!proc_fd_access_allowed(inode)) 1531 if (!proc_fd_access_allowed(inode))
1532 goto out; 1532 goto out;
1533 1533
1534 error = PROC_I(inode)->op.proc_get_link(inode, &path); 1534 error = PROC_I(inode)->op.proc_get_link(dentry, &path);
1535 if (error) 1535 if (error)
1536 goto out; 1536 goto out;
1537 1537
@@ -1823,9 +1823,9 @@ static int proc_fd_info(struct inode *inode, struct path *path, char *info)
1823 return -ENOENT; 1823 return -ENOENT;
1824} 1824}
1825 1825
1826static int proc_fd_link(struct inode *inode, struct path *path) 1826static int proc_fd_link(struct dentry *dentry, struct path *path)
1827{ 1827{
1828 return proc_fd_info(inode, path, NULL); 1828 return proc_fd_info(dentry->d_inode, path, NULL);
1829} 1829}
1830 1830
1831static int tid_fd_revalidate(struct dentry *dentry, struct nameidata *nd) 1831static int tid_fd_revalidate(struct dentry *dentry, struct nameidata *nd)