Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.4.1-pre8 /fs/buffer.c

Filename:/fs/buffer.c
Lines Added:6
Lines Deleted:1
Also changed in: (Previous) 2.4.1-pre6  2.4.1-pre7  2.4.1-pre4  2.4.1-pre5  2.4.1-pre3  2.4.1-pre2 
(Following) 2.4.1-pre9  2.4.1-pre10  2.4.1-pre11  2.4.1-pre12  2.4.1  2.4.1-ac1 

Location
[  2.4.1-pre8
  [  fs
     o  buffer.c

Patch

diff -u --recursive --new-file v2.4.0/linux/fs/buffer.c linux/fs/buffer.c
--- v2.4.0/linux/fs/buffer.c   Wed Jan  3 20:45:26 2001
+++ linux/fs/buffer.c   Mon Jan 15 12:42:32 2001
@@ -834,6 +834,10 @@
    return;
 }
 
+void set_buffer_async_io(struct buffer_head *bh) {
+    bh->b_end_io = end_buffer_io_async ;
+}
+
 /*
  * Synchronise all the inode's dirty buffers to the disk.
  *
@@ -1151,7 +1155,7 @@
    /* grab the lru lock here to block bdflush. */
    spin_lock(&lru_list_lock);
    write_lock(&hash_table_lock);
-   if (!atomic_dec_and_test(&buf->b_count) || buffer_locked(buf))
+   if (!atomic_dec_and_test(&buf->b_count) || buffer_locked(buf) || buffer_protected(buf))
       goto in_use;
    __hash_unlink(buf);
    remove_inode_queue(buf);
@@ -2411,6 +2415,7 @@
          loop = 1;
          goto cleaned_buffers_try_again;
       }
+      wakeup_bdflush(0);
    }
    return 0;
 }


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.