public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat•com>
To: Trond Myklebust <trond.myklebust@fys•uio.no>
Cc: Stephen Rothwell <sfr@canb•auug.org.au>, linux-next@vger•kernel.org
Subject: Re: linux-next: nfs build failure
Date: Tue, 17 Jun 2008 16:37:38 -0400	[thread overview]
Message-ID: <20080617163738.0f7fd47e@barsoom.rdu.redhat.com> (raw)
In-Reply-To: <1213733955.7288.24.camel@localhost>

On Tue, 17 Jun 2008 16:19:15 -0400
Trond Myklebust <trond.myklebust@fys•uio.no> 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 <Trond.Myklebust@netapp•com>
> 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 <Trond.Myklebust@netapp•com>
> Cc: Jeff Layton <jlayton@redhat•com>
> ---
> 
>  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 <jlayton@redhat•com>

  reply	other threads:[~2008-06-17 20:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-17  9:26 linux-next: nfs build failure Stephen Rothwell
2008-06-17 20:19 ` Trond Myklebust
2008-06-17 20:37   ` Jeff Layton [this message]
2008-06-18  0:49   ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2008-06-18  2:52 Stephen Rothwell
2008-06-18 20:14 ` Trond Myklebust
2008-06-18 20:37   ` Chuck Lever
2008-06-18 21:15     ` Trond Myklebust
2008-06-18 21:19       ` Randy Dunlap
2008-06-18 22:18         ` Trond Myklebust

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080617163738.0f7fd47e@barsoom.rdu.redhat.com \
    --to=jlayton@redhat$(echo .)com \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=sfr@canb$(echo .)auug.org.au \
    --cc=trond.myklebust@fys$(echo .)uio.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox