lkml.org 
[lkml]   [1999]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectbforget 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/

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