Re: [PATCH RFC v2 2/4] ovl: specify layers via file descriptors

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

 



On Fri, Oct 11, 2024 at 11:45:51PM +0200, Christian Brauner wrote:

> +static int ovl_parse_layer(struct fs_context *fc, struct fs_parameter *param,
> +			   enum ovl_opt layer)
> +{
> +	struct path path __free(path_put) = {};
> +	char *buf __free(kfree) = NULL;

Move down to the scope where it's used.  And just initialize
with kmalloc().

> +	char *layer_name;
> +	int err = 0;
> +
> +	if (param->type == fs_value_is_file) {
> +		buf = kmalloc(PATH_MAX, GFP_KERNEL_ACCOUNT);
> +		if (!buf)
> +			return -ENOMEM;




[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux