[PATCH] ubifs: Add freeze support

Christoph Hellwig hch at infradead.org
Sat May 27 01:23:38 PDT 2017


> +static int ubifs_freeze_super(struct super_block *sb)
> +{
> +	struct ubifs_info *c = sb->s_fs_info;
> +	int err;
> +
> +	dbg_gen("starting");
> +	/* freeze_super always succeeds if file system is in read-only.
> +	 * however if there are errors, UBIFS is switched to read-only mode.
> +	 * so @ro_error should be checked.
> +	 */
> +	err = freeze_super(sb);
> +	if (!err && c->ro_error) {
> +		thaw_super(sb);
> +		return -EIO;
> +	}
> +	return err;

This is just broken.  First ubifs should still properly propagate
the errors, and second freezing/unfreezing read only file systems is
perfectly valid, and third the freeze_super method is a special
hack for gfs2 that should not gain additional users.



More information about the linux-mtd mailing list