Re: [PATCH v4] ovl: mark xwhiteouts directory with overlay.opaque='x'

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

 



On Tue, 23 Jan 2024 at 11:39, Amir Goldstein <amir73il@xxxxxxxxx> wrote:

> diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c
> index 0551ba4e3e6a..a8e17f14d7a2 100644
> --- a/fs/overlayfs/util.c
> +++ b/fs/overlayfs/util.c
> @@ -485,7 +485,7 @@ void ovl_layer_set_xwhiteouts(struct ovl_fs *ofs,
>                 return;
>
>         /* Write once to read-mostly layer properties */
> -       ((struct ovl_layer *)layer)->has_xwhiteouts = true;
> +       ofs->layers[layer->idx].has_xwhiteouts = true;
>  }
>
> --
>
> It's still a bit ugly that @layer argument to this function is const,
> but the first likely check is really const and I do not want to make
> ovl_path::layer non-const.
>
> Do you agree with the above change?

Yep, better than the cast.

Thanks,
Miklos




[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