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