Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757829Ab1E3S4z (ORCPT ); Mon, 30 May 2011 14:56:55 -0400 Received: from na3sys009aog114.obsmtp.com ([74.125.149.211]:51962 "EHLO na3sys009aog114.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751337Ab1E3S4U (ORCPT ); Mon, 30 May 2011 14:56:20 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=nanometrics.ca; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=ot58/5M6sSl6cpdV1gcILxDkFOBMM/kC8CxOj7fo49KFbHtt/99t+Zki1tZ6dZZMlz TJJsrjuqiJNIh1tXMpweiMHZ8lUBtwFEKIyZaQRdH3SV4J3Sp+B+svKapzG/9AgcB4r8 qLW6ZdM78A/e9E1p8Lzqb+a0qMlrvkQXCwPsw= From: Ben Gardiner To: Artem Bityutskiy , Adrian Hunter Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, "Matthew L. Creech" Subject: [PATCH 1/3] UBIFS: assert no fixup when writing a node Date: Mon, 30 May 2011 14:56:14 -0400 Message-Id: <4a63933a3365daf8d1ec38d22c9029a949f3eccd.1306780983.git.bengardiner@nanometrics.ca> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1027 Lines: 33 The current free space fixup can result in some writing to the UBI volume when the space_fixup flag is set. To catch instances where UBIFS is writing to the NAND while the space_fixup flag is set, add an assert to ubifs_write_node(). Signed-off-by: Ben Gardiner --- fs/ubifs/io.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c index 166951e..db298de 100644 --- a/fs/ubifs/io.c +++ b/fs/ubifs/io.c @@ -763,6 +763,8 @@ int ubifs_write_node(struct ubifs_info *c, void *buf, int len, int lnum, if (c->ro_error) return -EROFS; + ubifs_assert(!c->space_fixup); + ubifs_prepare_node(c, buf, len, 1); err = ubi_leb_write(c->ubi, lnum, buf, offs, buf_len, dtype); if (err) { -- 1.7.4.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/