Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa59f27c authored by Anand Jain's avatar Anand Jain Committed by David Sterba
Browse files

btrfs: rename btrfs_parse_early_options



Rename btrfs_parse_early_options() to btrfs_parse_device_options(). As
btrfs_parse_early_options() parses the -o device options and scan the
device provided. So this rename specifies its action. Also the function
name is in line with btrfs_parse_subvol_options().
No functional changes.

Signed-off-by: default avatarAnand Jain <anand.jain@oracle.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent c8389d4c
Loading
Loading
Loading
Loading
+6 −7
Original line number Original line Diff line number Diff line
@@ -465,9 +465,8 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
		case Opt_subvolrootid:
		case Opt_subvolrootid:
		case Opt_device:
		case Opt_device:
			/*
			/*
			 * These are parsed by btrfs_parse_subvol_options
			 * These are parsed by btrfs_parse_subvol_options or
			 * and btrfs_parse_early_options
			 * btrfs_parse_device_options and can be ignored here.
			 * and can be happily ignored here.
			 */
			 */
			break;
			break;
		case Opt_nodatasum:
		case Opt_nodatasum:
@@ -883,7 +882,7 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
 * All other options will be parsed on much later in the mount process and
 * All other options will be parsed on much later in the mount process and
 * only when we need to allocate a new super block.
 * only when we need to allocate a new super block.
 */
 */
static int btrfs_parse_early_options(const char *options, fmode_t flags,
static int btrfs_parse_device_options(const char *options, fmode_t flags,
				      void *holder)
				      void *holder)
{
{
	substring_t args[MAX_OPT_ARGS];
	substring_t args[MAX_OPT_ARGS];
@@ -951,7 +950,7 @@ static int btrfs_parse_subvol_options(const char *options, char **subvol_name,


	/*
	/*
	 * strsep changes the string, duplicate it because
	 * strsep changes the string, duplicate it because
	 * btrfs_parse_early_options gets called later
	 * btrfs_parse_device_options gets called later
	 */
	 */
	opts = kstrdup(options, GFP_KERNEL);
	opts = kstrdup(options, GFP_KERNEL);
	if (!opts)
	if (!opts)
@@ -1558,7 +1557,7 @@ static struct dentry *btrfs_mount_root(struct file_system_type *fs_type,
	}
	}


	mutex_lock(&uuid_mutex);
	mutex_lock(&uuid_mutex);
	error = btrfs_parse_early_options(data, mode, fs_type);
	error = btrfs_parse_device_options(data, mode, fs_type);
	if (error) {
	if (error) {
		mutex_unlock(&uuid_mutex);
		mutex_unlock(&uuid_mutex);
		goto error_fs_info;
		goto error_fs_info;