Re: [PATCH v2 1/2] fs: replace const char* parameter in vfs_statx and do_statx with struct filename

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

 



On Mon, Feb 14, 2022 at 04:21:20PM -0800, Stefan Roesch wrote:
>  {
> -	return do_statx(dfd, filename, flags, mask, buffer);
> +	int ret;
> +	struct filename *name;
> +
> +	name = getname_flags(filename, getname_statx_lookup_flags(flags), NULL);
> +	ret = do_statx(dfd, name, flags, mask, buffer);
> +	if (name)
> +		putname(name);

... and the same comment goes for this one - getname... does *not*
report a failure as NULL; it's ERR_PTR(), and putname(ERR_PTR(...))
is an explicit no-op.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux