Messages in this thread Patch in this message | | | Date | Tue, 27 Apr 1999 15:16:05 +0200 (CEST) | From | Andrea Arcangeli <> | Subject | bforget and protected buffers |
| |
Shound't we also check if the buffer was protected before put it on the freelist? Once a buffer is on the freelist it can be reclycled at any time from getblk and the protected bit would go away... (I think the ramdisk driver can go in troubles then...).
Here a fix against 2.2.6:
Index: linux/fs//buffer.c =================================================================== RCS file: /var/cvs/linux/fs/buffer.c,v retrieving revision 1.1.1.8 diff -u -r1.1.1.8 buffer.c --- linux/fs/buffer.c 1999/03/29 21:38:51 1.1.1.8 +++ linux/fs/buffer.c 1999/04/27 13:13:40 @@ -849,7 +849,7 @@ */ void __bforget(struct buffer_head * buf) { - if (buf->b_count != 1 || buffer_locked(buf)) { + if (buf->b_count != 1 || buffer_locked(buf) || buffer_protected(buf)) { __brelse(buf); return; } Andrea Arcangeli
- 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/
| |