lkml.org 
[lkml]   [2000]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
From
Date
> I'll recompile one kernel and post an obvious patch to remove remove_proc_entry()
> soon if that seems to work. Anyway, it will still be possible to change the permissions
> in the subdirectories. Perhaps this is desired behaviour ...

Hmmm, I was wrong about the function referenced in fs/proc/root.c. It's proc_unlink()
which is referenced. The following patch simply removes it from the structure
"proc_dyna_dir_inode_operations" in kernel 2.2.17pre19. It works for me, but I repeat
that I don't know if this could break something. Testers welcome.

(also MIME-attached)

Cheers,

Willy

--- linux/fs/proc/root.c Wed Oct 27 02:53:42 1999
+++ linux/fs/proc/root.c Thu Aug 24 00:59:35 2000
@@ -29,7 +29,6 @@

static int proc_root_readdir(struct file *, void *, filldir_t);
static struct dentry *proc_root_lookup(struct inode *,struct dentry *);
-static int proc_unlink(struct inode *, struct dentry *);

static unsigned char proc_alloc_map[PROC_NDYNAMIC / 8] = {0};

@@ -86,7 +85,7 @@
NULL, /* create */
proc_lookup, /* lookup */
NULL, /* link */
- proc_unlink, /* unlink(struct inode *, struct dentry *) */
+ NULL, /* unlink(struct inode *, struct dentry *) */
NULL, /* symlink */
NULL, /* mkdir */
NULL, /* rmdir */
@@ -988,17 +987,5 @@
break;
filp->f_pos++;
}
- return 0;
-}
-
-static int proc_unlink(struct inode *dir, struct dentry *dentry)
-{
- struct proc_dir_entry * dp = dir->u.generic_ip;
-
-printk("proc_file_unlink: deleting %s/%s\n", dp->name, dentry->d_name.name);
-
- remove_proc_entry(dentry->d_name.name, dp);
- dentry->d_inode->i_nlink = 0;
- d_delete(dentry);
return 0;
}
--- linux/fs/proc/root.c Wed Oct 27 02:53:42 1999
+++ linux/fs/proc/root.c Thu Aug 24 00:59:35 2000
@@ -29,7 +29,6 @@

static int proc_root_readdir(struct file *, void *, filldir_t);
static struct dentry *proc_root_lookup(struct inode *,struct dentry *);
-static int proc_unlink(struct inode *, struct dentry *);

static unsigned char proc_alloc_map[PROC_NDYNAMIC / 8] = {0};

@@ -86,7 +85,7 @@
NULL, /* create */
proc_lookup, /* lookup */
NULL, /* link */
- proc_unlink, /* unlink(struct inode *, struct dentry *) */
+ NULL, /* unlink(struct inode *, struct dentry *) */
NULL, /* symlink */
NULL, /* mkdir */
NULL, /* rmdir */
@@ -988,17 +987,5 @@
break;
filp->f_pos++;
}
- return 0;
-}
-
-static int proc_unlink(struct inode *dir, struct dentry *dentry)
-{
- struct proc_dir_entry * dp = dir->u.generic_ip;
-
-printk("proc_file_unlink: deleting %s/%s\n", dp->name, dentry->d_name.name);
-
- remove_proc_entry(dentry->d_name.name, dp);
- dentry->d_inode->i_nlink = 0;
- d_delete(dentry);
return 0;
}
\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.031 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site