public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Linus Torvalds <torvalds@osdl.org>,
	nfs@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [GIT] NFS client fixes for 2.6.23++
Date: Fri, 19 Oct 2007 20:41:49 -0500	[thread overview]
Message-ID: <20071020014149.GA19871@lixom.net> (raw)
In-Reply-To: <1192828993.7466.18.camel@heimdal.trondhjem.org>

nfs: Fix build break with CONFIG_NFS_V4=n

Signed-off-by: Olof Johansson <olof@lixom.net>

---


On Fri, Oct 19, 2007 at 05:23:13PM -0400, Trond Myklebust wrote:
> Hi Linus,
> 
> Please pull from the repository at
> 
>    git pull git://git.linux-nfs.org/pub/linux/nfs-2.6.git
> 
> This will update the following files through the appended changesets.
> 
[...]
> @@ -522,8 +522,12 @@ void put_nfs_open_context(struct nfs_open_context *ctx)
>  		return;
>  	list_del(&ctx->list);
>  	spin_unlock(&inode->i_lock);
> -	if (ctx->state != NULL)
> -		nfs4_close_state(&ctx->path, ctx->state, ctx->mode);
> +	if (ctx->state != NULL) {
> +		if (wait)
> +			nfs4_close_sync(&ctx->path, ctx->state, ctx->mode);
> +		else
> +			nfs4_close_state(&ctx->path, ctx->state, ctx->mode);
> +	}
>  	if (ctx->cred != NULL)
>  		put_rpccred(ctx->cred);
>  	dput(ctx->path.dentry);

This gives me build errors on most PPC defconfigs, which don't enable NFSv4.

This seems sufficient to fix it.


diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index a4e3b96..b35069a 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -236,6 +236,7 @@ extern struct svc_version nfs4_callback_version1;
 #else
 
 #define nfs4_close_state(a, b, c) do { } while (0)
+#define nfs4_close_sync(a, b, c) do { } while (0)
 
 #endif /* CONFIG_NFS_V4 */
 #endif /* __LINUX_FS_NFS_NFS4_FS.H */

  reply	other threads:[~2007-10-20  1:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-19 21:23 [GIT] NFS client fixes for 2.6.23++ Trond Myklebust
2007-10-20  1:41 ` Olof Johansson [this message]
2007-10-20 17:24   ` [NFS] " Trond Myklebust
2007-10-20  2:19 ` Erez Zadok
2007-10-20  2:32   ` Linus Torvalds
2007-10-20  2:44     ` Erez Zadok
2007-10-20  2:57       ` Linus Torvalds
2007-10-20  4:02         ` Erez Zadok
2007-10-20 17:22     ` [NFS] " 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=20071020014149.GA19871@lixom.net \
    --to=olof@lixom.net \
    --cc=Trond.Myklebust@netapp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nfs@lists.sourceforge.net \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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