possible problem in do_change_root?

Bill Hawes (whawes@star.net)
Mon, 11 Aug 1997 11:57:26 -0400


I'm not positive on this, but it seems as if do_change_root in
fs/super.c could be doing too many dputs on the old root dentry. It
does

old_root = current->fs->root;
...
dput(old_root);
...
d_umount(old_root);
d_mount(dir,old_root);

Normally at d_umount time the dentry count is just 1, so it looks like
the dentry might have been freed by the time the d_mount is done.

This would only affect people using initrd -- do you think this might
explain the mysterious corrupted dentry problems?

Regards,
Bill