lkml.org 
[lkml]   [1999]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Linux-2.2.4 testpatch..
On Wed, 24 Mar 1999, Andrea Arcangeli wrote:

>Also after get_unused_buffer_head there is a b_count = 0 (that btw, looks
>like not needed to me because a bh-header in the unused_list will be
>zeroed for sure).

So it looks like to me that there is space for this little improvement:

Index: fs/buffer.c
===================================================================
RCS file: /var/cvs/linux/fs/buffer.c,v
retrieving revision 1.1.2.30
diff -u -r1.1.2.30 buffer.c
--- buffer.c 1999/03/24 01:24:43 1.1.2.30
+++ linux/fs/buffer.c 1999/03/24 18:23:52
@@ -1073,13 +1073,16 @@
bh->b_this_page = head;
head = bh;

- bh->b_state = 0;
bh->b_next_free = NULL;
- bh->b_count = 0;
bh->b_size = size;

bh->b_data = (char *) (page+offset);
+
+#if 0 /* a buffer in the unused_list is just implicit zeroed. -arca */
+ bh->b_count = 0;
+ bh->b_state = 0;
bh->b_list = 0;
+#endif
}
return head;
/*

I'll try (if I am going to reformat my hard drive let me know ;)).

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.135 / U:1.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site