Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 377574
b: refs/heads/master
c: 5d9cf9c
h: refs/heads/master
v: v3
  • Loading branch information
Zheng Liu authored and Theodore Ts'o committed May 28, 2013
1 parent 931f518 commit 3d09ea6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 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: d23142c6271c499d913d0d5e668b5a4eb6dafcb0
refs/heads/master: 5d9cf9c6254ddc551fb51072f59dfae60e579736
8 changes: 3 additions & 5 deletions trunk/fs/jbd2/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2325,13 +2325,13 @@ static struct journal_head *journal_alloc_journal_head(void)
#ifdef CONFIG_JBD2_DEBUG
atomic_inc(&nr_journal_heads);
#endif
ret = kmem_cache_alloc(jbd2_journal_head_cache, GFP_NOFS);
ret = kmem_cache_zalloc(jbd2_journal_head_cache, GFP_NOFS);
if (!ret) {
jbd_debug(1, "out of memory for journal_head\n");
pr_notice_ratelimited("ENOMEM in %s, retrying.\n", __func__);
while (!ret) {
yield();
ret = kmem_cache_alloc(jbd2_journal_head_cache, GFP_NOFS);
ret = kmem_cache_zalloc(jbd2_journal_head_cache, GFP_NOFS);
}
}
return ret;
Expand Down Expand Up @@ -2393,10 +2393,8 @@ struct journal_head *jbd2_journal_add_journal_head(struct buffer_head *bh)
struct journal_head *new_jh = NULL;

repeat:
if (!buffer_jbd(bh)) {
if (!buffer_jbd(bh))
new_jh = journal_alloc_journal_head();
memset(new_jh, 0, sizeof(*new_jh));
}

jbd_lock_bh_journal_head(bh);
if (buffer_jbd(bh)) {
Expand Down

0 comments on commit 3d09ea6

Please sign in to comment.