Messages in this thread Patch in this message | | | Date | Mon, 9 Aug 1999 01:22:34 +0200 (CEST) | From | Andrea Arcangeli <> | 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/
| |