Re: Race in iput()

2000-06-08 Thread Alexander Viro



On Wed, 7 Jun 2000, Andrea Arcangeli wrote:

> On Tue, 6 Jun 2000, Alexander Viro wrote:
> 
> > Erm... Andrea, could you tell why was ->i_count left
> >non-atomic? Since iput() can be called without the big lock...
> >Comments?
> 
> It's not atomic because we have to synchronze the i_count changes with the
> list changes (see __iget), so making it atomic_t would only add some
> locked instruction as far I can tell.

... And remove the race with ext2_link() and every other function that
does inode->i_count++ without holding the icache lock. Excuse me, did you
actually grep for i_count?




Re: Race in iput()

2000-06-08 Thread Andrea Arcangeli

On Tue, 6 Jun 2000, Alexander Viro wrote:

>   Erm... Andrea, could you tell why was ->i_count left
>non-atomic? Since iput() can be called without the big lock...
>Comments?

It's not atomic because we have to synchronze the i_count changes with the
list changes (see __iget), so making it atomic_t would only add some
locked instruction as far I can tell.

Andrea