Re: [PATCH v4 13/15] fuse: use iomap for read_folio

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

 



On Tue, Sep 23, 2025 at 05:39:13PM +0200, Miklos Szeredi wrote:
> On Tue, 23 Sept 2025 at 02:34, Joanne Koong <joannelkoong@xxxxxxxxx> wrote:
> 
> >  static int fuse_read_folio(struct file *file, struct folio *folio)
> >  {
> >         struct inode *inode = folio->mapping->host;
> > -       int err;
> > +       struct fuse_fill_read_data data = {
> > +               .file = file,
> > +       };
> > +       struct iomap_read_folio_ctx ctx = {
> > +               .cur_folio = folio,
> > +               .ops = &fuse_iomap_read_ops,
> > +               .read_ctx = &data,
> >
> > -       err = -EIO;
> > -       if (fuse_is_bad(inode))
> > -               goto out;
> > +       };
> >
> > -       err = fuse_do_readfolio(file, folio, 0, folio_size(folio));
> > -       if (!err)
> > -               folio_mark_uptodate(folio);
> > +       if (fuse_is_bad(inode)) {
> > +               folio_unlock(folio);
> > +               return -EIO;
> > +       }
> >
> > +       iomap_read_folio(&fuse_iomap_ops, &ctx);
> 
> Why is the return value ignored?

There is no return value:
https://lore.kernel.org/linux-fsdevel/20250923002353.2961514-13-joannelkoong@xxxxxxxxx/T/#u

Errors get set on the file/mapping/sb, nobody checks the return value
of ->read_folio.

--D

> Thanks,
> Miklos
> 




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux