patch-2.1.37 linux/fs/proc/link.c
Next file: linux/fs/proc/mem.c
Previous file: linux/fs/proc/inode.c
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Mon May 12 10:35:42 1997
- Orig file:
v2.1.36/linux/fs/proc/link.c
- Orig date:
Sun Jan 26 02:07:45 1997
diff -u --recursive --new-file v2.1.36/linux/fs/proc/link.c linux/fs/proc/link.c
@@ -68,7 +68,7 @@
unsigned int pid, ino;
struct task_struct * p;
struct inode * new_inode;
- int i, error;
+ int error;
*res_inode = NULL;
if (dir)
@@ -82,10 +82,9 @@
ino = inode->i_ino;
pid = ino >> 16;
ino &= 0x0000ffff;
- for (i = 0 ; i < NR_TASKS ; i++)
- if ((p = task[i]) && p->pid == pid)
- break;
- if (i >= NR_TASKS) {
+
+ p = find_task_by_pid(pid);
+ if (!p) {
iput(inode);
return -ENOENT;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov