Commit 8c777cc4 authored by Pekka Enberg's avatar Pekka Enberg Committed by Linus Torvalds

[PATCH] reiserfs: use __GFP_NOFAIL instead of yield and retry loop for allocation

This patch replaces yield and retry loop with __GFP_NOFAIL in
alloc_journal_list().
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d739b42b
...@@ -2446,12 +2446,8 @@ static int journal_read(struct super_block *p_s_sb) ...@@ -2446,12 +2446,8 @@ static int journal_read(struct super_block *p_s_sb)
static struct reiserfs_journal_list *alloc_journal_list(struct super_block *s) static struct reiserfs_journal_list *alloc_journal_list(struct super_block *s)
{ {
struct reiserfs_journal_list *jl; struct reiserfs_journal_list *jl;
retry: jl = kzalloc(sizeof(struct reiserfs_journal_list),
jl = kzalloc(sizeof(struct reiserfs_journal_list), GFP_NOFS); GFP_NOFS | __GFP_NOFAIL);
if (!jl) {
yield();
goto retry;
}
INIT_LIST_HEAD(&jl->j_list); INIT_LIST_HEAD(&jl->j_list);
INIT_LIST_HEAD(&jl->j_working_list); INIT_LIST_HEAD(&jl->j_working_list);
INIT_LIST_HEAD(&jl->j_tail_bh_list); INIT_LIST_HEAD(&jl->j_tail_bh_list);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment