Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161487AbWAMHdH (ORCPT ); Fri, 13 Jan 2006 02:33:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1161489AbWAMHdH (ORCPT ); Fri, 13 Jan 2006 02:33:07 -0500 Received: from courier.cs.helsinki.fi ([128.214.9.1]:4736 "EHLO mail.cs.helsinki.fi") by vger.kernel.org with ESMTP id S1161487AbWAMHdG (ORCPT ); Fri, 13 Jan 2006 02:33:06 -0500 Date: Fri, 13 Jan 2006 09:33:05 +0200 (EET) From: Pekka J Enberg To: akpm@osdl.org cc: linux-kernel@vger.kernel.org, reiserfs-dev@namesys.com Subject: [PATCH] reiserfs: use __GFP_NOFAIL instead of yield and retry loop for allocation Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1209 Lines: 35 From: Pekka Enberg This patch replaces yield and retry loop with __GFP_NOFAIL in alloc_journal_list(). Compile-tested only. Signed-off-by: Pekka Enberg --- fs/reiserfs/journal.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) Index: 2.6/fs/reiserfs/journal.c =================================================================== --- 2.6.orig/fs/reiserfs/journal.c +++ 2.6/fs/reiserfs/journal.c @@ -2446,12 +2446,8 @@ static int journal_read(struct super_blo static struct reiserfs_journal_list *alloc_journal_list(struct super_block *s) { struct reiserfs_journal_list *jl; - retry: - jl = kzalloc(sizeof(struct reiserfs_journal_list), GFP_NOFS); - if (!jl) { - yield(); - goto retry; - } + jl = kzalloc(sizeof(struct reiserfs_journal_list), + GFP_NOFS | __GFP_NOFAIL); INIT_LIST_HEAD(&jl->j_list); INIT_LIST_HEAD(&jl->j_working_list); INIT_LIST_HEAD(&jl->j_tail_bh_list); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/