Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 713
b: refs/heads/master
c: f246315
h: refs/heads/master
i:
  711: 7ba6fc0
v: v3
  • Loading branch information
Daniel Drake authored and Linus Torvalds committed May 1, 2005
1 parent 55739a9 commit 1836509
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: bcf88e1163623e8e8ef2ba7feface9c826a890c9
refs/heads/master: f246315e1ab96c40978777d1e159820ecca45aa8
8 changes: 6 additions & 2 deletions trunk/fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1419,6 +1419,8 @@ static struct file_operations proc_tgid_attr_operations;
static struct inode_operations proc_tgid_attr_inode_operations;
#endif

static int get_tid_list(int index, unsigned int *tids, struct inode *dir);

/* SMP-safe */
static struct dentry *proc_pident_lookup(struct inode *dir,
struct dentry *dentry,
Expand Down Expand Up @@ -1458,7 +1460,7 @@ static struct dentry *proc_pident_lookup(struct inode *dir,
*/
switch(p->type) {
case PROC_TGID_TASK:
inode->i_nlink = 3;
inode->i_nlink = 2 + get_tid_list(2, NULL, dir);
inode->i_op = &proc_task_inode_operations;
inode->i_fop = &proc_task_operations;
break;
Expand Down Expand Up @@ -1943,7 +1945,8 @@ static int get_tid_list(int index, unsigned int *tids, struct inode *dir)

if (--index >= 0)
continue;
tids[nr_tids] = tid;
if (tids != NULL)
tids[nr_tids] = tid;
nr_tids++;
if (nr_tids >= PROC_MAXPIDS)
break;
Expand Down Expand Up @@ -2043,6 +2046,7 @@ static int proc_task_readdir(struct file * filp, void * dirent, filldir_t filldi
}

nr_tids = get_tid_list(pos, tid_array, inode);
inode->i_nlink = pos + nr_tids;

for (i = 0; i < nr_tids; i++) {
unsigned long j = PROC_NUMBUF;
Expand Down

0 comments on commit 1836509

Please sign in to comment.