Re: Deep look into VFS

Martin Dalecki
2001-12-05T15:41:11Z

Alexander Viro wrote:
>
> On Wed, 5 Dec 2001, Martin Dalecki wrote:
>
> > Unless I'm compleatly misguided the lock on the superblock
> > should entierly prevent the race described inside the header comment
> > and we should be able to delete clear_inode from this function.
>
> Huh? We drop that lock before the return from this function. So if you
> move clear_inode() after the return, you lose that protections.
>
> What's more, you can't more that lock_super()/unlock_super() into iput()
> itself - you need it _not_ taken in the beginning of ext2_delete_inode()
> and you don't want it for quite a few filesystems.
>
> Nothing VFS-specific here, just a bog-standard "you lose protection of
> semaphore once you call up()"...

Ummmmm... that is well trivially true... of course (I'm
slapping a hand on my forehead).

Thank you for answering!