[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <8738uh5va9.fsf@openvz.org>
Date: Tue, 23 Apr 2013 15:41:18 +0400
From: Dmitry Monakhov <dmonakhov@...nvz.org>
To: LKML <linux-kernel@...r.kernel.org>, linux-fsdevel@...r.kernel.org
CC: Andrew Morton <akpm@...ux-foundation.org>
Subject: question about buffer_busy check
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_Lock)));
}
I try to digg inside git/cvs history and it is appeared that 2.4 was
also implemented like this. At least it was so in 2000'th
http://lkml.indiana.edu/hypermail/linux/kernel/0006.0/0412.html
Also I've found similar complain
http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg24377.html
But seems nobody care about it. What's the point?
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 should fix
View attachment "0001-buffer-fix-miss-typo.patch" of type "text/x-patch" (699 bytes)
Powered by blists - more mailing lists