Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1398426 > unrolled thread

[PATCH] fs: befs: use flags field to validate fs state

Started bySalah Triki <salah.triki@acm.org>
First post2016-05-10 21:10 +0200
Last post2016-05-10 21:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] fs: befs: use flags field to validate fs state Salah Triki <salah.triki@acm.org> - 2016-05-10 21:10 +0200
    Re: [PATCH] fs: befs: use flags field to validate fs state Andrew Morton <akpm@linux-foundation.org> - 2016-05-10 21:20 +0200

#1398426 — [PATCH] fs: befs: use flags field to validate fs state

FromSalah Triki <salah.triki@acm.org>
Date2016-05-10 21:10 +0200
Subject[PATCH] fs: befs: use flags field to validate fs state
Message-ID<rxlcC-uF-21@gated-at.bofh.it>
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 <salah.triki@acm.org>
---
 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.");
-- 
1.9.1

[toc] | [next] | [standalone]


#1398435

FromAndrew Morton <akpm@linux-foundation.org>
Date2016-05-10 21:20 +0200
Message-ID<rxlmi-zy-17@gated-at.bofh.it>
In reply to#1398426
On Tue, 10 May 2016 19:59:42 +0100 Salah Triki <salah.triki@acm.org> 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 <salah.triki@acm.org>
> ---
>  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?

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web