patch-2.3.99-pre9 linux/fs/proc/generic.c
Next file: linux/fs/proc/kcore.c
Previous file: linux/fs/proc/base.c
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
Sun May 21 20:34:37 2000
- Orig file:
v2.3.99-pre8/linux/fs/proc/generic.c
- Orig date:
Thu May 11 15:30:08 2000
diff -u --recursive --new-file v2.3.99-pre8/linux/fs/proc/generic.c linux/fs/proc/generic.c
@@ -140,9 +140,13 @@
{
switch (orig) {
case 0:
+ if (offset < 0)
+ return -EINVAL;
file->f_pos = offset;
return(file->f_pos);
case 1:
+ if (offset + file->f_pos < 0)
+ return -EINVAL;
file->f_pos += offset;
return(file->f_pos);
case 2:
@@ -218,10 +222,9 @@
* smarter: we could keep a "volatile" flag in the
* inode to indicate which ones to keep.
*/
-static void
-proc_delete_dentry(struct dentry * dentry)
+static int proc_delete_dentry(struct dentry * dentry)
{
- d_drop(dentry);
+ return 1;
}
static struct dentry_operations proc_dentry_operations =
@@ -340,7 +343,7 @@
lookup: proc_lookup,
};
-int proc_register(struct proc_dir_entry * dir, struct proc_dir_entry * dp)
+static int proc_register(struct proc_dir_entry * dir, struct proc_dir_entry * dp)
{
int i;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)