Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932968AbZAOUOr (ORCPT ); Thu, 15 Jan 2009 15:14:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1765907AbZAOUAu (ORCPT ); Thu, 15 Jan 2009 15:00:50 -0500 Received: from kroah.org ([198.145.64.141]:48955 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1765334AbZAOUAh (ORCPT ); Thu, 15 Jan 2009 15:00:37 -0500 Date: Thu, 15 Jan 2009 11:58:04 -0800 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, NeilBrown Subject: [patch 23/94] md: fix bitmap-on-external-file bug. Message-ID: <20090115195804.GW14419@kroah.com> References: <20090115194806.804618825@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="md-fix-bitmap-on-external-file-bug.patch" In-Reply-To: <20090115195520.GA14403@kroah.com> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1330 Lines: 44 2.6.28-stable review patch. If anyone has any objections, please let us know. ------------------ From: NeilBrown commit 538452700d95480c16e7aa6b10ff77cd937d33f4 upstream. commit a2ed9615e3222645007fc19991aedf30eed3ecfd fixed a bug with 'internal' bitmaps, but in the process broke 'in a file' bitmaps. So they are broken in 2.6.28 This fixes it, and needs to go in 2.6.28-stable. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman --- drivers/md/bitmap.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -964,9 +964,11 @@ static int bitmap_init_from_disk(struct */ page = bitmap->sb_page; offset = sizeof(bitmap_super_t); - read_sb_page(bitmap->mddev, bitmap->offset, - page, - index, count); + if (!file) + read_sb_page(bitmap->mddev, + bitmap->offset, + page, + index, count); } else if (file) { page = read_page(file, index, bitmap, count); offset = 0; -- 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/