patch-2.1.128 linux/fs/proc/root.c
Next file: linux/fs/qnx4/file.c
Previous file: linux/fs/proc/array.c
Back to the patch index
Back to the overall index
- Lines: 25
- Date:
Sun Nov 8 14:06:17 1998
- Orig file:
v2.1.127/linux/fs/proc/root.c
- Orig date:
Mon Sep 28 10:51:35 1998
diff -u --recursive --new-file v2.1.127/linux/fs/proc/root.c linux/fs/proc/root.c
@@ -827,6 +827,7 @@
inode = proc_get_inode(dir->i_sb, ino, &proc_pid);
if (!inode)
return -EINVAL;
+ inode->i_flags|=S_IMMUTABLE;
}
dentry->d_op = &proc_dentry_operations;
@@ -943,6 +944,7 @@
for (i = 0; i < nr_pids; i++) {
int pid = pid_array[i];
+ ino_t ino = (pid << 16) + PROC_PID_INO;
unsigned long j = PROC_NUMBUF;
do {
@@ -951,7 +953,7 @@
pid /= 10;
} while (pid);
- if (filldir(dirent, buf+j, PROC_NUMBUF-j, filp->f_pos, (pid << 16) + PROC_PID_INO) < 0)
+ if (filldir(dirent, buf+j, PROC_NUMBUF-j, filp->f_pos, ino) < 0)
break;
filp->f_pos++;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov