Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763499AbZCNBzx (ORCPT ); Fri, 13 Mar 2009 21:55:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755870AbZCNBVt (ORCPT ); Fri, 13 Mar 2009 21:21:49 -0400 Received: from kroah.org ([198.145.64.141]:35738 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754366AbZCNBVR (ORCPT ); Fri, 13 Mar 2009 21:21:17 -0400 X-Mailbox-Line: From gregkh@mini.kroah.org Fri Mar 13 18:10:45 2009 Message-Id: <20090314011045.310960315@mini.kroah.org> User-Agent: quilt/0.48-1 Date: Fri, 13 Mar 2009 18:11:11 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, "Aneesh Kumar K.V" Subject: [patch 094/114] ext4: Initialize preallocation list_heads properly References: <20090314010937.416083662@mini.kroah.org> Content-Disposition: inline; filename=ext4-initialize-preallocation-list_head-s-properly.patch In-Reply-To: <20090314011649.GA26170@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1495 Lines: 38 2.6.28-stable review patch. If anyone has any objections, please let us know. ------------------ From: Aneesh Kumar K.V (cherry picked from commit d794bf8e0936dce45104565cd48c571061f4c1e3) When creating a new ext4_prealloc_space structure, we have to initialize its list_head pointers before we add them to any prealloc lists. Otherwise, with list debug enabled, we will get list corruption warnings. Signed-off-by: Aneesh Kumar K.V Signed-off-by: "Theodore Ts'o" Signed-off-by: Greg Kroah-Hartman --- fs/ext4/mballoc.c | 3 +++ 1 file changed, 3 insertions(+) --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -3690,6 +3690,8 @@ ext4_mb_new_inode_pa(struct ext4_allocat pa->pa_free = pa->pa_len; atomic_set(&pa->pa_count, 1); spin_lock_init(&pa->pa_lock); + INIT_LIST_HEAD(&pa->pa_inode_list); + INIT_LIST_HEAD(&pa->pa_group_list); pa->pa_deleted = 0; pa->pa_linear = 0; @@ -3748,6 +3750,7 @@ ext4_mb_new_group_pa(struct ext4_allocat atomic_set(&pa->pa_count, 1); spin_lock_init(&pa->pa_lock); INIT_LIST_HEAD(&pa->pa_inode_list); + INIT_LIST_HEAD(&pa->pa_group_list); pa->pa_deleted = 0; pa->pa_linear = 1; -- 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/