[PATCH -next] erofs: convert to use super_set_uuid to support for FS_IOC_GETFSUUID

Gao Xiang hsiangkao at linux.alibaba.com
Mon Jun 24 16:37:23 AEST 2024



On 2024/6/24 14:37, Huang Xiaojia wrote:
> FS_IOC_GETFSUUID ioctl exposes the uuid of a filesystem. To support
> the ioctl, init sb->s_uuid with super_set_uuid().
> 
> Signed-off-by: Huang Xiaojia <huangxiaojia2 at huawei.com>

Thanks for fixing:
Reviewed-by: Gao Xiang <hsiangkao at linux.alibaba.com>

Thanks,
Gao Xiang

> ---
>   fs/erofs/super.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/erofs/super.c b/fs/erofs/super.c
> index c93bd24d2771..1b91d9513013 100644
> --- a/fs/erofs/super.c
> +++ b/fs/erofs/super.c
> @@ -343,7 +343,7 @@ static int erofs_read_superblock(struct super_block *sb)
>   	sbi->build_time = le64_to_cpu(dsb->build_time);
>   	sbi->build_time_nsec = le32_to_cpu(dsb->build_time_nsec);
>   
> -	memcpy(&sb->s_uuid, dsb->uuid, sizeof(dsb->uuid));
> +	super_set_uuid(sb, (void *)dsb->uuid, sizeof(dsb->uuid));
>   
>   	ret = strscpy(sbi->volume_name, dsb->volume_name,
>   		      sizeof(dsb->volume_name));


More information about the Linux-erofs mailing list