From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Layton Subject: Re: linux-next: nfs build failure Date: Tue, 17 Jun 2008 16:37:38 -0400 Message-ID: <20080617163738.0f7fd47e@barsoom.rdu.redhat.com> References: <20080617192622.e448a37e.sfr@canb.auug.org.au> <1213733955.7288.24.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.redhat.com ([66.187.233.31]:42196 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753132AbYFQUh7 (ORCPT ); Tue, 17 Jun 2008 16:37:59 -0400 In-Reply-To: <1213733955.7288.24.camel@localhost> Sender: linux-next-owner@vger.kernel.org List-ID: To: Trond Myklebust Cc: Stephen Rothwell , linux-next@vger.kernel.org On Tue, 17 Jun 2008 16:19:15 -0400 Trond Myklebust wrote: > On Tue, 2008-06-17 at 19:26 +1000, Stephen Rothwell wrote: > > Hi Trond, > > > > Today's linux-next build (powerpc ppc44x_defconfig) failed like this: > > > > fs/nfs/super.c: In function 'nfs_remount': > > fs/nfs/super.c:1440: error: 'nfs4_fs_type' undeclared (first use in this function) > > > > Caused by commit 68a2efd9008ee81e72a4d1dcdf228414f5dfa6ff ("NFS: > > implement option checking when remounting NFS filesystems (resend)"). > > > > I applied the following patch (which may not be correct). > > Thanks Stephen! The patch looks correct, but I think I'd still prefer > the following to avoid the #ifdef. > > Cheers > Trond > ---------------------------------------------------------------- > From: Trond Myklebust > Date: Tue, 17 Jun 2008 16:12:00 -0400 > NFS: Fix a dependency on CONFIG_NFS_V4 in nfs_remount > > Fix the 'nfs4_fs_type' undeclared error in nfs_remount when compiling sans > NFSv4... > > Signed-off-by: Trond Myklebust > Cc: Jeff Layton > --- > > fs/nfs/super.c | 5 +++-- > 1 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/fs/nfs/super.c b/fs/nfs/super.c > index 39c028e..c8f29ac 100644 > --- a/fs/nfs/super.c > +++ b/fs/nfs/super.c > @@ -1426,6 +1426,7 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data) > struct nfs_parsed_mount_data *data; > struct nfs_mount_data *options = (struct nfs_mount_data *)raw_data; > struct nfs4_mount_data *options4 = (struct nfs4_mount_data *)raw_data; > + u32 nfsvers = nfss->nfs_client->rpc_ops->version; > > /* > * Userspace mount programs that send binary options generally send > @@ -1433,8 +1434,8 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data) > * ones were explicitly specified. Fall back to legacy behavior and > * just return success. > */ > - if ((sb->s_type == &nfs4_fs_type && options4->version == 1) || > - (sb->s_type == &nfs_fs_type && options->version >= 1 && > + if ((nfsvers == 4 && options4->version == 1) || > + (nfsvers <= 3 && options->version >= 1 && > options->version <= 6)) > return 0; > > > ACK...that looks better to me too. -- Jeff Layton