Re: [PATCH dhowells/mount-context] fs: don't call fs_context->free() from fsmount()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 31, 2018 at 09:56:45PM +0100, David Howells wrote:
> Andrei Vagin <avagin@xxxxxxxxxxxxx> wrote:
> 
> > > I can do this two ways: (1) stick a flag in the context that says if
> > > ->free() needs calling, (2) make all the ->free() routines aware that they
> > > may see the reset state.  I think (1) is less error prone.
> > 
> > Does it mean that fc->fs_type->init_fs_context() should not be called
> > contexts which are created from fspick()?
> 
> No.  I've put a flag in the context that is set when ->init_fs_context() is
> called and cleared when ->free() is called.  ->free() isn't called in the put
> routine if the flag isn't set.

> /* We've done the mount bit - now move the file context into
>  * more or less the same state as if we'd done an fspick().

According to this comment, a context after fsmount() should be in
the same state as after fspick().

In fsmount(), we call ->free() which is oposite to init_fs_context(). If
we want to have "more or less the same state" and want to call
fs_context->free() in fsmount(), this means that we should not call
fc->fs_type->init_fs_context() in fspick()...  Where am I wrong?


> 
> David



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux