Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30240
b: refs/heads/master
c: aed7a6c
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Jun 26, 2006
1 parent 980766f commit e8cdc46
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 87bfbf679ffb1e95dd9ada694f66aafc4bfa5959
refs/heads/master: aed7a6c476d90660ac5af860158407ae9fe61c68
6 changes: 3 additions & 3 deletions trunk/fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ static int proc_fd_link(struct inode *inode, struct dentry **dentry, struct vfsm
struct task_struct *task = proc_task(inode);
struct files_struct *files;
struct file *file;
int fd = proc_type(inode) - PROC_TID_FD_DIR;
int fd = proc_fd(inode);

files = get_files_struct(task);
if (files) {
Expand Down Expand Up @@ -1368,7 +1368,6 @@ static struct inode *proc_pid_make_inode(struct super_block * sb, struct task_st
*/
get_task_struct(task);
ei->task = task;
ei->type = ino;
inode->i_uid = 0;
inode->i_gid = 0;
if (task_dumpable(task)) {
Expand Down Expand Up @@ -1418,7 +1417,7 @@ static int tid_fd_revalidate(struct dentry *dentry, struct nameidata *nd)
{
struct inode *inode = dentry->d_inode;
struct task_struct *task = proc_task(inode);
int fd = proc_type(inode) - PROC_TID_FD_DIR;
int fd = proc_fd(inode);
struct files_struct *files;

files = get_files_struct(task);
Expand Down Expand Up @@ -1525,6 +1524,7 @@ static struct dentry *proc_lookupfd(struct inode * dir, struct dentry * dentry,
if (!inode)
goto out;
ei = PROC_I(inode);
ei->fd = fd;
files = get_files_struct(task);
if (!files)
goto out_unlock;
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/proc/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static struct inode *proc_alloc_inode(struct super_block *sb)
if (!ei)
return NULL;
ei->task = NULL;
ei->type = 0;
ei->fd = 0;
ei->op.proc_get_link = NULL;
ei->pde = NULL;
inode = &ei->vfs_inode;
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/proc/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static inline struct task_struct *proc_task(struct inode *inode)
return PROC_I(inode)->task;
}

static inline int proc_type(struct inode *inode)
static inline int proc_fd(struct inode *inode)
{
return PROC_I(inode)->type;
return PROC_I(inode)->fd;
}
2 changes: 1 addition & 1 deletion trunk/include/linux/proc_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ extern void kclist_add(struct kcore_list *, void *, size_t);

struct proc_inode {
struct task_struct *task;
int type;
int fd;
union {
int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **);
int (*proc_read)(struct task_struct *task, char *page);
Expand Down

0 comments on commit e8cdc46

Please sign in to comment.