lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1233840498.7161.97.camel@heimdal.trondhjem.org>
Date:	Thu, 05 Feb 2009 08:28:18 -0500
From:	Trond Myklebust <Trond.Myklebust@...app.com>
To:	Bryan Wu <cooloney@...nel.org>
Cc:	linux-nfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] nfs client: kill compile warning on NOMMU machine

On Thu, 2009-02-05 at 17:02 +0800, Bryan Wu wrote:
> Hi guys,
> 
> Is it possible to merge this patch?

NACK. Although it would be nice to get rid of the warning, this patch
does so at the price of even further obfuscating the fact that we're
just returning -ENOSYS in the no MMU case, and by causing
nfs_file_vm_ops (which is currently optimised away) to be compiled in
for no good reason at all.

Trond

> Thanks
> -Bryan
> 
> On Thu, Nov 6, 2008 at 5:15 PM, Bryan Wu <cooloney@...nel.org> wrote:
> > On nommu machine such as Blackfin, when compling NFS we got an warning about
> > nfs_file_mmap() function defined but not used.
> >
> > This patch kills this warning.
> >
> > Signed-off-by: Bryan Wu <cooloney@...nel.org>
> > ---
> >  fs/nfs/file.c |   16 ++++++++++++----
> >  1 files changed, 12 insertions(+), 4 deletions(-)
> >
> > diff --git a/fs/nfs/file.c b/fs/nfs/file.c
> > index d319b49..66b8b8e 100644
> > --- a/fs/nfs/file.c
> > +++ b/fs/nfs/file.c
> > @@ -64,11 +64,7 @@ const struct file_operations nfs_file_operations = {
> >        .write          = do_sync_write,
> >        .aio_read       = nfs_file_read,
> >        .aio_write      = nfs_file_write,
> > -#ifdef CONFIG_MMU
> >        .mmap           = nfs_file_mmap,
> > -#else
> > -       .mmap           = generic_file_mmap,
> > -#endif
> >        .open           = nfs_file_open,
> >        .flush          = nfs_file_flush,
> >        .release        = nfs_file_release,
> > @@ -294,6 +290,7 @@ nfs_file_splice_read(struct file *filp, loff_t *ppos,
> >        return res;
> >  }
> >
> > +#ifdef CONFIG_MMU
> >  static int
> >  nfs_file_mmap(struct file * file, struct vm_area_struct * vma)
> >  {
> > @@ -312,6 +309,17 @@ nfs_file_mmap(struct file * file, struct vm_area_struct * vma)
> >        }
> >        return status;
> >  }
> > +#else
> > +static int
> > +nfs_file_mmap(struct file *file, struct vm_area_struct *vma)
> > +{
> > +       /* Kill warning: 'nfs_file_vm_ops' defined but not used */
> > +       struct vm_operations_struct *vm_ops;
> > +       vm_ops = &nfs_file_vm_ops;
> > +
> > +       return generic_file_mmap(file, vma);
> > +}
> > +#endif
> >
> >  /*
> >  * Flush any dirty pages for this process, and check for write errors.
> > --
> > 1.5.6.3
> >
-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@...app.com
www.netapp.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ