aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r--fs/proc/base.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index fa0e6bee40fa..9562df760901 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -297,7 +297,7 @@ static int proc_fd_link(struct inode *inode, struct dentry **dentry, struct vfsm
297 struct task_struct *task = proc_task(inode); 297 struct task_struct *task = proc_task(inode);
298 struct files_struct *files; 298 struct files_struct *files;
299 struct file *file; 299 struct file *file;
300 int fd = proc_type(inode) - PROC_TID_FD_DIR; 300 int fd = proc_fd(inode);
301 301
302 files = get_files_struct(task); 302 files = get_files_struct(task);
303 if (files) { 303 if (files) {
@@ -1368,7 +1368,6 @@ static struct inode *proc_pid_make_inode(struct super_block * sb, struct task_st
1368 */ 1368 */
1369 get_task_struct(task); 1369 get_task_struct(task);
1370 ei->task = task; 1370 ei->task = task;
1371 ei->type = ino;
1372 inode->i_uid = 0; 1371 inode->i_uid = 0;
1373 inode->i_gid = 0; 1372 inode->i_gid = 0;
1374 if (task_dumpable(task)) { 1373 if (task_dumpable(task)) {
@@ -1418,7 +1417,7 @@ static int tid_fd_revalidate(struct dentry *dentry, struct nameidata *nd)
1418{ 1417{
1419 struct inode *inode = dentry->d_inode; 1418 struct inode *inode = dentry->d_inode;
1420 struct task_struct *task = proc_task(inode); 1419 struct task_struct *task = proc_task(inode);
1421 int fd = proc_type(inode) - PROC_TID_FD_DIR; 1420 int fd = proc_fd(inode);
1422 struct files_struct *files; 1421 struct files_struct *files;
1423 1422
1424 files = get_files_struct(task); 1423 files = get_files_struct(task);
@@ -1525,6 +1524,7 @@ static struct dentry *proc_lookupfd(struct inode * dir, struct dentry * dentry,
1525 if (!inode) 1524 if (!inode)
1526 goto out; 1525 goto out;
1527 ei = PROC_I(inode); 1526 ei = PROC_I(inode);
1527 ei->fd = fd;
1528 files = get_files_struct(task); 1528 files = get_files_struct(task);
1529 if (!files) 1529 if (!files)
1530 goto out_unlock; 1530 goto out_unlock;