Re: [PATCH] AFS: Fix file locking

David Howells
2007-07-18T09:24:26Z

Andrew Morton <akpm@linux-foundation.org> wrote:

> Here we use
>
> vnode->flags & (1 << foo)
>
> > + set_bit(AFS_VNODE_LOCKING, &vnode->flags);
>
> and elsewhere we use set_bit(foo, &vnode->flags) and clear_bit()

Ah... IIRC I was originally testing multiple bits in one go (test_bit()'s do
not merge because of the volatile pointer).

However, as I'm doing only one test now, I'll convert it to test_bit().

David