Messages in this thread | | | Date | Sat, 11 Sep 1999 20:25:08 +0200 | From | Jan Kara <> | Subject | Bug 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/
| |