mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Patch: linux-2.5.59/fs/devfs shrink
@ 2003-01-18  3:02 Adam J. Richter
  0 siblings, 0 replies; 2+ messages in thread
From: Adam J. Richter @ 2003-01-18  3:02 UTC (permalink / raw)
  To: linux-kernel

	An updated version of my patch to shrink devfs by replacing
its filesystem operations with code derived from ramfs is now FTPable
from the following URL.  Christoph Hellwig got my fs/devfs/util.c
changes integrated in to 2.5.59 along with some other cleanups of his,
so there no longer any change to util.c in my patch, and now only one
line is changed in include/linux/fs/devfs_fs_kernel.h.  The patch is a
net deletion of 2447 lines.

ftp://ftp.yggdrasil.com/pub/dist/device_control/devfs/smalldevfs-2.5.59-v8.patch


	Also, there is a new 0.2 version of devfs_helper (partial
devfsd replacment) FTPable the following URL.  The only difference is
a fix to a bug where an extra character was being copied in rules that
involved expanding regular expression matches.

ftp://ftp.yggdrasil.com/pub/dist/device_control/devfs/devfs_helper-0.2.tar.gz

	Although I'd personally like to see my patch integrated into
2.5, the only bug that I think it fixes is extremely obscure (a module
unload race for character devices that probably nobody will hit), and
nothing else relies on it.  I'm happy to keep people updated by
posting new versions of this patch as necessary until 2.7 opens up,
although, as I said, I also wouldn't mind seeing it integrated
earlier.

Adam J. Richter     __     ______________   575 Oroville Road
adam@yggdrasil.com     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America
                         "Free Software For The Rest Of Us."

^ permalink raw reply	[flat|nested] 2+ messages in thread
* Re: Patch: linux-2.5.59/fs/devfs shrink
@ 2003-01-18  5:08 Adam J. Richter
  0 siblings, 0 replies; 2+ messages in thread
From: Adam J. Richter @ 2003-01-18  5:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm

	Many thanks to Andrew Morton for a patch to my devfs shrink
that fixes premature unlocking of an inode, eliminates a redundant "if
(err)", and removes an incorrect comment.  I'm running with Andrew's
changes now, and I've put up a new diff against 2.5.59 so that
everyone can be up to date, at the following URL.

ftp://ftp.yggdrasil.com/pub/dist/device_control/devfs/smalldevfs-2.5.59-v9.patch

	Just for completeness, here is the URL for devfs_helper (no change):

ftp://ftp.yggdrasil.com/pub/dist/device_control/devfs/devfs_helper-0.2.tar.gz

	Also for completeness, I've appended a copy of Andrew's diff.

Adam J. Richter     __     ______________   575 Oroville Road
adam@yggdrasil.com     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America
                         "Free Software For The Rest Of Us."



 devfs/base.c |   11 ++++-------
 devfs/fs.c   |    0 
 2 files changed, 4 insertions(+), 7 deletions(-)

diff -puN fs/devfs/base.c~a fs/devfs/base.c
--- 25/fs/devfs/base.c~a	2003-01-17 19:20:17.000000000 -0800
+++ 25-akpm/fs/devfs/base.c	2003-01-17 19:26:29.000000000 -0800
@@ -48,7 +48,6 @@ extern int __init init_devfs_fs(void);
    different interface from lookup_create. */
 extern struct dentry *lookup_create(struct nameidata *nd, int is_dir);
 
-/* Called and returns with dcache_lock held.  */
 static int walk_parents_mkdir(const char **path, struct nameidata *nd,
 			      int is_dir)
 {
@@ -78,10 +77,8 @@ static int walk_parents_mkdir(const char
 		
 		up(&nd->dentry->d_parent->d_inode->i_sem);
 
-		if (err) {
-			if (err)
-				return err;
-		}
+		if (err)
+			return err;
 
 		*path += len + 1;
 	}
@@ -156,7 +153,6 @@ devfs_handle_t devfs_register (devfs_han
 		goto err_free_devnum;
 
 	err = vfs_mknod(parent_inode, dentry, mode, devnum);
-	up(&parent_inode->i_sem);
 	if (!err) {
 		/* FIXME? Is DEVFS_FL_CURRENT_OWNER useful?  Don't we
 		   already set uid and gid to current->fs{uid,gid}?  */
@@ -164,8 +160,10 @@ devfs_handle_t devfs_register (devfs_han
 			dentry->d_inode->i_uid = current->uid;
 			dentry->d_inode->i_gid = current->gid;
 		}
+		up(&parent_inode->i_sem);
 		return dentry;
 	}
+	up(&parent_inode->i_sem);
 
 	dput(dentry);
 
@@ -259,7 +257,6 @@ void devfs_remove(const char *fmt, ...)
 		devfs_put(nd.dentry);
 	}
 }
-
 EXPORT_SYMBOL(devfs_remove);
 
 int devfs_only(void)
diff -puN fs/devfs/fs.c~a fs/devfs/fs.c

_

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-01-18  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-18  3:02 Patch: linux-2.5.59/fs/devfs shrink Adam J. Richter
2003-01-18  5:08 Adam J. Richter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®