On Fri, 2008-03-14 at 23:50 +0100, Eric Piel wrote:The problem is defining how much "very little" is, and making sure that all the other kernel developers agree with you on it. Anyway, I'm sick of too much bitching and too little coding. Andrew, here's a patch for -mm that will at least shut up the spinlock warnings. Al, you'll also need something similar to this for when you get Linus to pull your git tree that has the r/o bind mount patches. It's a hack, but I don't know any better way to do it until the ACPI mess gets cleaned up. Arjan, is there a way to statically set lockdep classes for a spinlock that I'm missing? I'll leave it to everyone else to describe the evils of calling into *any* fs code before the fs initcalls have been made. -- Dave I'm not happy with this patch, but I don't see an easier way to do it. We can't statically initialize the lockdep classes as far as I can see. --- linux-2.6.git-dave/fs/namespace.c | 3 +-- linux-2.6.git-dave/include/linux/mount.h | 1 + linux-2.6.git-dave/init/main.c | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff -puN fs/namei.c~robind-statically-initialize-locks fs/namei.c diff -puN fs/namespace.c~robind-statically-initialize-locks fs/namespace.c --- linux-2.6.git/fs/namespace.c~robind-statically-initialize-locks 2008-03-14 16:12:44.000000000 -0700 +++ linux-2.6.git-dave/fs/namespace.c 2008-03-14 16:16:43.000000000 -0700 @@ -158,7 +158,7 @@ struct mnt_writer { } ____cacheline_aligned_in_smp; static DEFINE_PER_CPU(struct mnt_writer, mnt_writers); -static int __init init_mnt_writers(void) +int __init init_mnt_writers(void) { int cpu; for_each_possible_cpu(cpu) { @@ -169,7 +169,6 @@ static int __init init_mnt_writers(void) } return 0; } -fs_initcall(init_mnt_writers); static void unlock_mnt_writers(void) { diff -puN init/main.c~robind-statically-initialize-locks init/main.c --- linux-2.6.git/init/main.c~robind-statically-initialize-locks 2008-03-14 16:13:02.000000000 -0700 +++ linux-2.6.git-dave/init/main.c 2008-03-14 16:17:33.000000000 -0700 @@ -58,6 +58,7 @@ #include <linux/kthread.h> #include <linux/sched.h> #include <linux/signal.h> +#include <linux/mount.h> #include <asm/io.h> #include <asm/bugs.h> @@ -650,6 +651,13 @@ asmlinkage void __init start_kernel(void check_bugs(); + /* + * This is a horrible hack. The ACPI code needs + * to learn how to do "DSDT override" without fs + * access or do it later in boot - Dave Hansen + */ + init_mnt_writers(); + populate_rootfs(); /* For DSDT override from initramfs */ acpi_early_init(); /* before LAPIC and SMP init */ diff -puN include/linux/mount.h~robind-statically-initialize-locks include/linux/mount.h --- linux-2.6.git/include/linux/mount.h~robind-statically-initialize-locks 2008-03-14 16:16:04.000000000 -0700 +++ linux-2.6.git-dave/include/linux/mount.h 2008-03-14 16:16:34.000000000 -0700 @@ -79,6 +79,7 @@ static inline struct vfsmount *mntget(st return mnt; } +extern int init_mnt_writers(void); extern int mnt_want_write(struct vfsmount *mnt); extern void mnt_drop_write(struct vfsmount *mnt); extern void mntput_no_expire(struct vfsmount *mnt); _ --
| Ryan Hope | reiser4 for 2.6.27-rc1 |
| Michael Kerrisk | Re: Slow DOWN, please!!! |
| Greg KH | [ANNOUNCE] linux-staging tree created |
| Ingo Molnar | Re: Rescheduling interrupts |
git: | |
| Sverre Rabbelier | Git vs Monotone |
| Kyle Moffett | Using GIT to store /etc (Or: How to make GIT store all file permission bits) |
| Steffen Prohaska | Re: [msysGit] Re: safecrlf not in 1.5.4 |
| Shawn O. Pearce | [PATCH] Correct dir.c to compile on Solaris 9 |
| Richard Stallman | Real men don't attack straw men |
| Jerome Santos | sshd.config and AllowUsers |
| Calomel | Re: Remove escape characters from file |
| Richard Daemon | OpenBSD 4.3 running in VirtualBox? Anyone have it working properly? |
| Sunando Sen | Re: [Q] "Cannot execute /bin/*sh: Permission denied" prevents login |
| C Wayne Huling | Re: Can males come from... |
| Jim Winstead Jr. | Re: Root Disk/Book Disk Compatibility |
| Craig I. Hagan | Re: Segate ST02 problems |
