Re: [PATCH v2 1/2] iomap: Add a page_prepare callback

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

 



On Thu, 25 Apr 2019 at 17:29, Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
>
> On Thu, Apr 25, 2019 at 05:26:30PM +0200, Andreas Gruenbacher wrote:
>
> This seems to be corrupted; there's no declaration of a page_ops in
> iomap_write_begin ... unless you're basing on a patch I don't have?

Oops, this has slipped into the 2nd patch, sorry.

> > diff --git a/fs/iomap.c b/fs/iomap.c
> > index 97cb9d486a7d..967c985c5310 100644
> > --- a/fs/iomap.c
> > +++ b/fs/iomap.c
> > @@ -674,9 +674,17 @@ iomap_write_begin(struct inode *inode, loff_t pos, unsigned len, unsigned flags,
> >       if (fatal_signal_pending(current))
> >               return -EINTR;
> >
> > +     if (page_ops) {
> > +             status = page_ops->page_prepare(inode, pos, len, iomap);
> > +             if (status)
> > +                     return status;
> > +     }
> > +
> >       page = grab_cache_page_write_begin(inode->i_mapping, index, flags);
> > -     if (!page)
> > -             return -ENOMEM;
> > +     if (!page) {
> > +             status = -ENOMEM;
> > +             goto no_page;
> > +     }
> >
> >       if (iomap->type == IOMAP_INLINE)
> >               iomap_read_inline_data(inode, page, iomap);

Andreas



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux