summaryrefslogtreecommitdiff
path: root/fs/buffer.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@zip.com.au>2002-06-17 20:20:09 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-06-17 20:20:09 -0700
commitc67b85b06126b960a44c1dcdf809cf9e947f4a1c (patch)
treed07f7cadc16a4e2bba33e1a0864b3c80c05a16c2 /fs/buffer.c
parent1704566fde4fd7ea2be6e8a4a2e0731459d0fa48 (diff)
[PATCH] clean up alloc_buffer_head()
alloc_bufer_head() does not need the additional argument - GFP_NOFS is always correct.
Diffstat (limited to 'fs/buffer.c')
-rw-r--r--fs/buffer.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 5d9dee75f287..70025ee603a6 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -945,12 +945,12 @@ void invalidate_inode_buffers(struct inode *inode)
* the size of each buffer.. Use the bh->b_this_page linked list to
* follow the buffers created. Return NULL if unable to create more
* buffers.
- * The async flag is used to differentiate async IO (paging, swapping)
- * from ordinary buffer allocations, and only async requests are allowed
- * to sleep waiting for buffer heads.
+ *
+ * The retry flag is used to differentiate async IO (paging, swapping)
+ * which may not fail from ordinary buffer allocations.
*/
static struct buffer_head *
-create_buffers(struct page * page, unsigned long size, int async)
+create_buffers(struct page * page, unsigned long size, int retry)
{
struct buffer_head *bh, *head;
long offset;
@@ -959,7 +959,7 @@ try_again:
head = NULL;
offset = PAGE_SIZE;
while ((offset -= size) >= 0) {
- bh = alloc_buffer_head(async);
+ bh = alloc_buffer_head();
if (!bh)
goto no_grow;
@@ -996,7 +996,7 @@ no_grow:
* become available. But we don't want tasks sleeping with
* partially complete buffers, so all were released above.
*/
- if (!async)
+ if (!retry)
return NULL;
/* We're _really_ low on memory. Now we just
@@ -2392,7 +2392,7 @@ asmlinkage long sys_bdflush(int func, long data)
static kmem_cache_t *bh_cachep;
static mempool_t *bh_mempool;
-struct buffer_head *alloc_buffer_head(int async)
+struct buffer_head *alloc_buffer_head(void)
{
return mempool_alloc(bh_mempool, GFP_NOFS);
}