Re: [PATCH] Set MS_ACTIVE in isofs_fill_super()

From: Jan Kara
Date: Fri Apr 01 2005 - 10:18:00 EST


> On Wed, Mar 30, 2005 at 12:39:07PM -0800, Andrew Morton wrote:
<snip>
> > I wonder if it would make more sense for all the ->fill_super callers to
> > set MS_ACTIVE prior to calling ->fill_super(), and clear MS_ACTIVE if
> > fill_super() failed?
>
> This sounds like a better solution, although filesystems might have to
> handle some operations earlier than they currently expect.
Actually I've just checked the code and MS_ACTIVE is almost unused -
the only place where it is checked is generic_forget_inode(). So
Andrew's suggestion should be safe (and a quick grep showed that quite
a few filesystems already set MS_ACTIVE in their code)... What really
protects the filesystem from early operations is the fact that its
directory tree is made visible to the rest of the world in
do_add_mount() which is quite after fill_super() has finished.

Honza
--
Jan Kara <jack@xxxxxxx>
SuSE CR Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/