lkml.org 
[lkml]   [1999]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectBug in __bforget()?
  Hello.

While reading buffer cache code I found one thing which I didn't understand.
In __bforget() there is a test whether buffer head is in use or is locked.
The test looks like:
if (!atomic_dec_and_test(&buf->b_count) || buffer_locked(buf))
goto in_use;
But I think it should be:
if (atomic_dec_and_test(&buf->b_count)...))
goto in_use;
Because buffer is in use when it has b_count > 0 and now whne b_count == 0.
Am I missing something?

Honza.


-
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/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.042 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site