Re: [PATCH] gfs2, udf: update to use mmap_prepare

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

 



On Tue, Sep 02, 2025 at 02:34:15PM +0200, Andreas Gruenbacher wrote:
> > diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
> > index bc67fa058c84..c28ff8786238 100644
> > --- a/fs/gfs2/file.c
> > +++ b/fs/gfs2/file.c
> > @@ -577,7 +577,7 @@ static const struct vm_operations_struct gfs2_vm_ops = {
> >  };
> >
> >  /**
> > - * gfs2_mmap
> > + * gfs2_mmap_prepare
> >   * @file: The file to map
> >   * @vma: The VMA which described the mapping
> >   *
> > @@ -588,8 +588,9 @@ static const struct vm_operations_struct gfs2_vm_ops = {
> >   * Returns: 0
> >   */
> >
> > -static int gfs2_mmap(struct file *file, struct vm_area_struct *vma)
> > +static int gfs2_mmap_prepare(struct vm_area_desc *desc)
> >  {
> > +       struct file *file = desc->file;
> >         struct gfs2_inode *ip = GFS2_I(file->f_mapping->host);
> >
> >         if (!(file->f_flags & O_NOATIME) &&
> > @@ -605,7 +606,7 @@ static int gfs2_mmap(struct file *file, struct vm_area_struct *vma)
> >                 gfs2_glock_dq_uninit(&i_gh);
> >                 file_accessed(file);
> >         }
> > -       vma->vm_ops = &gfs2_vm_ops;
> > +       desc->vm_ops = &gfs2_vm_ops;
> >
> >         return 0;
> >  }
> > @@ -1585,7 +1586,7 @@ const struct file_operations gfs2_file_fops = {
> >         .iopoll         = iocb_bio_iopoll,
> >         .unlocked_ioctl = gfs2_ioctl,
> >         .compat_ioctl   = gfs2_compat_ioctl,
> > -       .mmap           = gfs2_mmap,
> > +       .mmap_prepare   = gfs2_mmap,
>
> This ought to be:
>   .mmap_prepare = gfs2_mmap_prepare,

Apologies, I missed this one (didn't set CONFIG_GFS2_FS_LOCKING_DLM in testing).

Christian - since this is trivial, could you fix up?

Thanks!




[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