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

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

Advertisement

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

Filename:/fs/buffer.c
Lines Added:5
Lines Deleted:4
Also changed in: (Previous) 2.4.17-pre7  2.4.17-pre6  2.4.17-pre5  2.4.17-pre3  2.4.17-pre4  2.4.15-greased-turkey 
(Following) 2.4.17-rc1  2.4.17-rc2  2.4.17  2.4.18-pre3-ac1  2.4.18-pre3-ac2  2.4.18-pre4 

Location
[  2.4.17-pre8
  [  fs
     o  buffer.c

Patch

diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.16/fs/buffer.c linux/fs/buffer.c
--- linux-2.4.16/fs/buffer.c   Mon Nov 26 10:35:00 2001
+++ linux/fs/buffer.c   Mon Dec 10 19:17:11 2001
@@ -73,7 +73,7 @@
 static rwlock_t hash_table_lock = RW_LOCK_UNLOCKED;
 
 static struct buffer_head *lru_list[NR_LIST];
-static spinlock_t lru_list_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t lru_list_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
 static int nr_buffers_type[NR_LIST];
 static unsigned long size_buffers_type[NR_LIST];
 
@@ -1036,6 +1036,7 @@
    unsigned long dirty, tot, hard_dirty_limit, soft_dirty_limit;
 
    dirty = size_buffers_type[BUF_DIRTY] >> PAGE_SHIFT;
+   dirty += size_buffers_type[BUF_LOCKED] >> PAGE_SHIFT;
    tot = nr_free_buffer_pages();
 
    dirty *= 100;
@@ -2002,12 +2003,12 @@
 {
    int i, nr_blocks, retval;
    unsigned long * blocks = iobuf->blocks;
+   struct buffer_head bh;
 
+   bh.b_dev = inode->i_dev;
    nr_blocks = iobuf->length / blocksize;
    /* build the blocklist */
    for (i = 0; i < nr_blocks; i++, blocknr++) {
-      struct buffer_head bh;
-
       bh.b_state = 0;
       bh.b_dev = inode->i_dev;
       bh.b_size = blocksize;
@@ -2033,7 +2034,7 @@
       blocks[i] = bh.b_blocknr;
    }
 
-   retval = brw_kiovec(rw, 1, &iobuf, inode->i_dev, iobuf->blocks, blocksize);
+   retval = brw_kiovec(rw, 1, &iobuf, bh.b_dev, iobuf->blocks, blocksize);
 
  out:
    return retval;


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