On Thu, May 23, 2019 at 05:19:05PM +0100, David Howells wrote:

>  out_no_data:
> -     dfprintk(MOUNT, "NFS: mount program didn't pass any mount data\n");
> -     return -EINVAL;
> +     if (fc->purpose == FS_CONTEXT_FOR_RECONFIGURE) {
> +             ctx->skip_reconfig_option_check = true;
> +             return 0;
> +     }

That really ought to be
        if (fc->root) { /* remount */
                ctx->skip_reconfig_option_check = true;
                return 0;
        }
and similar in the v4 counterpart.  fc->purpose is a bad idea; it is
possible to get rid of it.

Frankly, I'm tempted to add

static inline bool is_remount_fc(struct fs_context *fc)
{
        return fc->root != NULL;
}

and just use that in such places...

Reply via email to