Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187112
b: refs/heads/master
c: 019b4d1
h: refs/heads/master
v: v3
  • Loading branch information
Richard Kennedy authored and Linus Torvalds committed Mar 12, 2010
1 parent 9d34e91 commit 94496f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 03affdef4fc85e416e3862abb0aa549c6034cdd0
refs/heads/master: 019b4d123aa7b9fc135b532e021cfde85db7665d
13 changes: 2 additions & 11 deletions trunk/fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -3265,7 +3265,7 @@ static void recalc_bh_state(void)

struct buffer_head *alloc_buffer_head(gfp_t gfp_flags)
{
struct buffer_head *ret = kmem_cache_alloc(bh_cachep, gfp_flags);
struct buffer_head *ret = kmem_cache_zalloc(bh_cachep, gfp_flags);
if (ret) {
INIT_LIST_HEAD(&ret->b_assoc_buffers);
get_cpu_var(bh_accounting).nr++;
Expand Down Expand Up @@ -3352,15 +3352,6 @@ int bh_submit_read(struct buffer_head *bh)
}
EXPORT_SYMBOL(bh_submit_read);

static void
init_buffer_head(void *data)
{
struct buffer_head *bh = data;

memset(bh, 0, sizeof(*bh));
INIT_LIST_HEAD(&bh->b_assoc_buffers);
}

void __init buffer_init(void)
{
int nrpages;
Expand All @@ -3369,7 +3360,7 @@ void __init buffer_init(void)
sizeof(struct buffer_head), 0,
(SLAB_RECLAIM_ACCOUNT|SLAB_PANIC|
SLAB_MEM_SPREAD),
init_buffer_head);
NULL);

/*
* Limit the bh occupancy to 10% of ZONE_NORMAL
Expand Down

0 comments on commit 94496f2

Please sign in to comment.