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]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux