aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2006-06-26 03:25:44 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 12:58:24 -0400
commitaed7a6c476d90660ac5af860158407ae9fe61c68 (patch)
treeb8b92412f457598a2348de0eb304b9b4ec204157 /fs/proc/base.c
parent87bfbf679ffb1e95dd9ada694f66aafc4bfa5959 (diff)
[PATCH] proc: Replace proc_inode.type with proc_inode.fd
The sole renaming use of proc_inode.type is to discover the file descriptor number, so just store the file descriptor number and don't wory about processing this field. This removes any /proc limits on the maximum number of file descriptors, and clears the path to make the hard coded /proc inode numbers go away. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> 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.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;