patch-2.4.0-test2 linux/fs/proc/generic.c
Next file: linux/fs/proc/inode.c
Previous file: linux/fs/proc/base.c
Back to the patch index
Back to the overall index
- Lines: 43
- Date:
Thu Jun 22 07:09:45 2000
- Orig file:
v2.4.0-test1/linux/fs/proc/generic.c
- Orig date:
Tue May 23 15:31:36 2000
diff -u --recursive --new-file v2.4.0-test1/linux/fs/proc/generic.c linux/fs/proc/generic.c
@@ -14,6 +14,8 @@
#include <linux/sched.h>
#include <linux/proc_fs.h>
#include <linux/stat.h>
+#define __NO_VERSION__
+#include <linux/module.h>
#include <asm/bitops.h>
static ssize_t proc_file_read(struct file * file, char * buf,
@@ -42,7 +44,7 @@
#endif
/* 4K page size but our output routines use some slack for overruns */
-#define PROC_BLOCK_SIZE (3*1024)
+#define PROC_BLOCK_SIZE (PAGE_SIZE - 1024)
static ssize_t
proc_file_read(struct file * file, char * buf, size_t nbytes, loff_t *ppos)
@@ -397,13 +399,14 @@
continue;
if (inode->u.generic_ip != de)
continue;
+ fops_put(filp->f_op);
filp->f_op = NULL;
}
file_list_unlock();
}
struct proc_dir_entry *proc_symlink(const char *name,
- struct proc_dir_entry *parent, char *dest)
+ struct proc_dir_entry *parent, const char *dest)
{
struct proc_dir_entry *ent = NULL;
const char *fn = name;
@@ -535,7 +538,7 @@
{
int ino = de->low_ino;
- if (ino < PROC_DYNAMIC_FIRST &&
+ if (ino < PROC_DYNAMIC_FIRST ||
ino >= PROC_DYNAMIC_FIRST+PROC_NDYNAMIC)
return;
if (S_ISLNK(de->mode) && de->data)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)