[Ocfs2-tools-devel] [patch 2/9] Add strict check in ocfs2_open, take 3

Joel Becker Joel.Becker at oracle.com
Thu Jun 21 14:47:01 PDT 2007


On Wed, Jun 20, 2007 at 03:21:08PM +0800, tao.ma at oracle.com wrote:
> +
> +		/* We need to check s_tunefs_flag also to make sure
> +		 * fsck.ocfs2 won't try to clean up an aborted tunefs
> +		 * that it doesn't know.
> +		 */
> +		if (OCFS2_RAW_SB(fs->fs_super)->s_tunefs_flag &
> +		    ~OCFS2_LIB_ABORTED_TUNEFS_SUPP)
> +			    goto out;

Change it to:
		if (OCFS2_HAS_INCOMPAT_FEATURE(OCFS2_RAW_SB(fs->fs_super),
					       OCFS2_FEATURE_INCOMPAT_TUNEFS_INPROG) && 
		    (OCFS2_RAW_SB(fs->fs_super)->s_tunefs_flag &
		     ~OCFS2_LIB_ABORTED_TUNEFS_SUPP))
			goto out;

>  	}

	You only check s_tunesfs_flag if FEATURE_INCOMPAT_TUNEFS is set.
Otherwise, the field could be garbage.

Joel


-- 

 One look at the From:
 understanding has blossomed
 .procmailrc grows
	- Alexander Viro

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-tools-devel mailing list