lkml.org 
[lkml]   [1999]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] preserve fast-path in buffer.c
The fast path is the case where create_buffer is succesfully so it worth
to take it inline.

diff -ur 2.3.13-pre8/fs/buffer.c 2.3.13-pre8-tmp/fs/buffer.c
--- 2.3.13-pre8/fs/buffer.c Sun Aug 8 17:21:37 1999
+++ 2.3.13-pre8-tmp/fs/buffer.c Mon Aug 9 01:21:02 1999
@@ -1911,10 +1911,8 @@
if (!(page = __get_free_page(GFP_BUFFER)))
return 0;
bh = create_buffers(page, size, 0);
- if (!bh) {
- free_page(page);
- return 0;
- }
+ if (!bh)
+ goto no_buffer_head;

isize = BUFSIZE_INDEX(size);

@@ -1944,6 +1942,10 @@
mem_map[MAP_NR(page)].buffers = bh;
atomic_add(PAGE_SIZE, &buffermem);
return 1;
+
+no_buffer_head:
+ free_page(page);
+ return 0;
}

/*
Andrea


-
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:53    [W:1.886 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site