Re: question about buffer_busy check

2013-04-23 Thread Al Viro
On Tue, Apr 23, 2013 at 03:41:18PM +0400, Dmitry Monakhov wrote: > The only guess I have is that this is a miss typo because buffer > is busy if some one hold an reference (bh->b_count !=0 ) || > it is (dirty | locked). So following patch ... is pointless. All callers only care about the return

question about buffer_busy check

2013-04-23 Thread Dmitry Monakhov
Hi, Can anyone please justify me the logic of fs/bufferc.c:buffer_busy() How can we perform bit-wise operation for ->b_count and ->b_state? static inline int buffer_busy(struct buffer_head *bh) { return atomic_read(&bh->b_count) | (bh->b_state & ((1 << BH_Dirty) | (1 << BH