| Kernel v2.4.17-pre8 /fs/buffer.c |
|---|
 2.4.17-pre8
 fs
 buffer.c
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;
|