(added okir@monad.swb.de to CC: list, as he is listed in the
header of linux/net/sunrpc/sched.c as author of this file)
To answer my own question... ;-)
Andreas Haumer wrote:
>
> Hi!
>
> Daniel Wagner wrote:
> >
> > Alan Cox wrote:
[...]
> > > It shouldnt be keeping a reference. daemonize() should have dropped its
> > > resources
> >
> > hmm, i've now created a /initrd directory to let the the change_root of
> > the
> > initrd work correctly.
> >
> > and then i looked with fuser, what processes reference the initrd:
> >
> > ---
> > root@ws4:~ $ fuser -mv /initrd/
> >
> > USER PID ACCESS COMMAND
> > /initrd/ root 67 .rc..
> > rpciod
> > ---
> >
> > only the rpciod references the initrd, none of the other
> > kernel-threads.
> >
> Could it be because, when executed, rpciod() calls
> exit_files(current) and exit_mm(current), but doesn't
> call exit_fs(current) (as, for instance, md_thread() does)?
> (we are talking 2.2.19 here)
>
Yes, an additional call to exit_fs(current) when initializing
the rpciod thread solves this problem without creating other
(obvious) problems (as it seems after a short test).
The inital ramdisk can now be unmounted cleanly even in case
of NFS root
The suggested patch is:
andreas@ws1:~/cvsdir {625} % cvs diff -C5 -rR_2-2-19~11 -rR_2-2-19~12
linux/net/sunrpc/sched.c
Index: linux/net/sunrpc/sched.c
===================================================================
RCS file:
/raid5/cvs/repository/distribution/Base/linux/net/sunrpc/sched.c,v
retrieving revision 1.1.1.6
retrieving revision 1.12
diff -C5 -r1.1.1.6 -r1.12
*** linux/net/sunrpc/sched.c 2001/03/25 16:37:42 1.1.1.6
--- linux/net/sunrpc/sched.c 2001/08/17 11:53:48 1.12
***************
*** 1066,1075 ****
--- 1066,1076 ----
rpciod_pid = current->pid;
up(&rpciod_running);
exit_files(current);
exit_mm(current);
+ exit_fs(current);
spin_lock_irq(¤t->sigmask_lock);
siginitsetinv(¤t->blocked, sigmask(SIGKILL));
recalc_sigpending(current);
spin_unlock_irq(¤t->sigmask_lock);
Alan, would you consider adding this patch to 2.2.20?
Thanks!
- andreas
-- Andreas Haumer | mailto:andreas@xss.co.at *x Software + Systeme | http://www.xss.co.at/ Karmarschgasse 51/2/20 | Tel: +43-1-6060114-0 A-1100 Vienna, Austria | Fax: +43-1-6060114-71 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/