Re: reiserfs 3.6.8 and ac13

From: Alexander Viro (viro@math.psu.edu)
Date: Sun Jun 11 2000 - 16:59:16 EST


On Sun, 11 Jun 2000, Hans Reiser wrote:

> > > inode->i_count++;
> >
> > It is now an atomic_t
> >
> > atomic_inc(&inode->i_count)
> >
> > ac13 has some 'features' so you may want to wait while those get stomped first.
>
> We'll address this with a patch. Thanks Alan.
>
> Yura, this is your todo.

Some background:

Some time ago iput() was taken out of the big lock. Unfortunately, that
exposed a race between incrementing ->i_count in ->link() and decrementing
it in iput() - iput()/iget() was safe due to the icache lock, but
foo_link() certainly didn't have such protection. It had been discussed on
fsdevel last week - grep for "iput". Patch made its way in -ac13. My
fault, I probably ought to announce that on fsdevel, but decided that
Alan's announce of -ac13 was enough.

This change really ought to happen back when iput() was taken out of the
big lock.

Fix is trivial - replace operations on ->i_count (you shouldn't have any
outside of ->link(), AFAICS) with their atomic counterparts. BTW, checks
for ->i_count when we are dropping the inode are redundant and can be
removed - see changes in ext2 for example of what does not need checking.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:24 EST