Re: [PATCH 2/2] fuse: clean up null folio check in fuse_copy_folio()

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

 



On Tue, Jul 1, 2025 at 10:34 PM Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
>
> On Fri, 23 May 2025 at 20:18, Joanne Koong <joannelkoong@xxxxxxxxx> wrote:
> >
> > In fuse_copy_folio(), the folio in *foliop will never be null.
> > fuse_copy_folio() is called from two places, fuse_copy_folios() and
> > fuse_notify_store(). In fuse_copy_folios(), the folio will never be null
> > since ap->num_folios always reflects how many folios are stored in the
> > ap->folios[] array.
>
> Hmm, well, did you verify that none of the callers leave any holes?
> ISTR there was a reason to put the NULL check in there, I just don't
> remember what that reason was.

I audited the places where ap->num_folios gets set or incremented and
didn't see any place where there wasn't also an
ap->folios[ap->num_folios] assignment preceding it.

I'm fine with dropping this patch if you would rather the NULL check
be left in there.

Thanks,
Joanne

>
> Thanks,
> Miklos





[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