Re: [PATCH 23/23] NFS: Add fs_context support.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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...



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux