On Thu, 27 Jul 2000, Daniel Phillips wrote:
> So now it's time to start asking questions.  Just jumping in at a place I felt I
> knew pretty well back in 2.2.13, I'm now looking at the 2.4.0 getblk, and I see
> it's changed somewhat.  Finding and removing a block from the free list is now
> bracketed by a spinlock pair.  First question: why do we use atomic_set to set
> the initial buffer use count if this is already protected by a spinlock?

have a look at other users of bh->b_count. For example __brelse() does
atomic_dec() and it is called directly from brelse() which can be called
by filesystem without any other protection.

regards,
Tigran

Reply via email to