From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752110AbcEJTPH (ORCPT ); Tue, 10 May 2016 15:15:07 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:54195 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751227AbcEJTPF (ORCPT ); Tue, 10 May 2016 15:15:05 -0400 Date: Tue, 10 May 2016 12:15:04 -0700 From: Andrew Morton To: Salah Triki Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] fs: befs: use flags field to validate fs state Message-Id: <20160510121504.257c2600f7bc4571c8cbcfed@linux-foundation.org> In-Reply-To: <1462906782-4432-1-git-send-email-salah.triki@acm.org> References: <1462906782-4432-1-git-send-email-salah.triki@acm.org> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 10 May 2016 19:59:42 +0100 Salah Triki wrote: > flags field records the state of the superblock, so it is > more appropriate to use this field for validating the fs state than > using the fields log_start and log_end. > > Signed-off-by: Salah Triki > --- > fs/befs/super.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/befs/super.c b/fs/befs/super.c > index aeafc4d..079fc00 100644 > --- a/fs/befs/super.c > +++ b/fs/befs/super.c > @@ -101,7 +101,7 @@ befs_check_sb(struct super_block *sb) > return BEFS_ERR; > } > > - if (befs_sb->log_start != befs_sb->log_end) { > + if (befs_sb->flags == BFS_DIRTY) { > befs_error(sb, "Filesystem not clean! There are blocks in the " > "journal. You must boot into BeOS and mount this volume " > "to make it clean."); Has this been tested?