Re: [PATCH 01/11] iomap: pass more arguments using struct iomap_writepage_ctx

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

 



On Tue, Jun 17, 2025 at 10:54:26AM -0700, Joanne Koong wrote:
> > -       struct iomap_writepage_ctx wpc = { };
> > +       struct iomap_writepage_ctx wpc = {
> > +               .inode          = mapping->host,
> > +               .wbc            = wbc,
> > +               .ops            = &blkdev_writeback_ops
> 
> Would it be worth defining the writeback ops inside the wpc struct as
> well instead of having that be in a separate "static const struct
> iomap_writeback_ops" definition outside the function? imo it makes it
> easier to follow to just have everything listed in one place

I'd rather not do that.  Having the structure that has function pointers
marked const and away from the data it operates on is nice to reduce the
attack surface. 





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux