Re: Q: fs/super.c invalidate_inodes after put_super

Bill Hawes (whawes@transmeta.com)
Tue, 09 Jun 1998 10:11:25 -0700


Eric W. Biederman wrote:

> In 2.1.93 fs/super.c:do_umount:
> Q1: Why was invalidate_inodes moved after put_super?
>
> Problem invalidate_inodes calls dispose_list(), displose_list() calls
> clear_inode(), and clear_inode() calls inode->i_op->clear_inode().
>
> But since the filesystem in already gone (put_super has been called)
> calling i_op->clear_inode() is dangerous especially since MOD_USE_COUNT
> for has been decremented and if anyone sleeps a modular fs may be
> removed! Then a kernel oops is assured!
>
> If there is a good reason to call invalidate_inodes() after put_super
> I don't know a clean fix to this problem :(

Hi Eric,

I don't recall the exact reasons for moving invalidate_inodes after
put_super, but I think it had something to do with allowing pseudo
filesystems to not require backing storage. IIRC Peter Anvin made the change,
so perhaps he can explain better.

But the problem you point out does need to be resolved, so we'll need to find
a way to make sure the fs doesn't disappear before all of the inodes are
removed.

Regards,
Bill

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu