linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH 04/21] NFS: Fix NFS4 callback up/down prototypes
Date: Thu, 06 Jul 2006 11:10:30 -0400	[thread overview]
Message-ID: <20060706151030.18779.11669.stgit@lade.trondhjem.org> (raw)
In-Reply-To: <20060706145424.18779.55583.stgit@lade.trondhjem.org>

From: David Howells <dhowells@redhat.com>

Make the nfs_callback_up()/down() prototypes just do nothing if NFS4 is not
enabled.  Also make the down function void type since we can't really do
anything if it fails.

Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
---

 fs/nfs/callback.c |    5 +----
 fs/nfs/callback.h |    7 ++++++-
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index d6c4bae..b1f7dc4 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -149,10 +149,8 @@ out_err:
 /*
  * Kill the server process if it is not already up.
  */
-int nfs_callback_down(void)
+void nfs_callback_down(void)
 {
-	int ret = 0;
-
 	lock_kernel();
 	mutex_lock(&nfs_callback_mutex);
 	nfs_callback_info.users--;
@@ -164,7 +162,6 @@ int nfs_callback_down(void)
 	} while (wait_for_completion_timeout(&nfs_callback_info.stopped, 5*HZ) == 0);
 	mutex_unlock(&nfs_callback_mutex);
 	unlock_kernel();
-	return ret;
 }
 
 static int nfs_callback_authenticate(struct svc_rqst *rqstp)
diff --git a/fs/nfs/callback.h b/fs/nfs/callback.h
index b252e7f..5676163 100644
--- a/fs/nfs/callback.h
+++ b/fs/nfs/callback.h
@@ -62,8 +62,13 @@ struct cb_recallargs {
 extern unsigned nfs4_callback_getattr(struct cb_getattrargs *args, struct cb_getattrres *res);
 extern unsigned nfs4_callback_recall(struct cb_recallargs *args, void *dummy);
 
+#ifdef CONFIG_NFS_V4
 extern int nfs_callback_up(void);
-extern int nfs_callback_down(void);
+extern void nfs_callback_down(void);
+#else
+#define nfs_callback_up()	(0)
+#define nfs_callback_down()	do {} while(0)
+#endif
 
 extern unsigned int nfs_callback_set_tcpport;
 extern unsigned short nfs_callback_tcpport;

  parent reply	other threads:[~2006-07-06 15:11 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-06 14:54 [PATCH 00/21] FSCACHE support for AFS and NFS Trond Myklebust
2006-07-06 15:10 ` [PATCH 01/21] NFS: Add dentry materialisation op Trond Myklebust
2006-07-06 15:10 ` [PATCH 02/21] NFS: Fix up split of fs/nfs/inode.c Trond Myklebust
2006-07-06 15:10 ` [PATCH 03/21] NFS: Disambiguate nfs_stat_to_errno() Trond Myklebust
2006-07-06 15:10 ` Trond Myklebust [this message]
2006-07-06 15:10 ` [PATCH 05/21] NFS: Rename struct nfs4_client to struct nfs_client Trond Myklebust
2006-07-06 15:10 ` [PATCH 06/21] NFS: Rename nfs_server::nfs4_state Trond Myklebust
2006-07-06 15:10 ` [PATCH 07/21] NFS: Return an error when starting the idmapping pipe Trond Myklebust
2006-07-06 15:10 ` [PATCH 08/21] NFS: Add a lookupfh NFS RPC op Trond Myklebust
2006-07-07  1:31   ` Andrew Morton
2006-07-06 15:10 ` [PATCH 09/21] " Trond Myklebust
2006-07-06 15:10 ` [PATCH 10/21] NFS: Generalise the nfs_client structure Trond Myklebust
2006-07-06 15:10 ` [PATCH 12/21] NFS: Add server and volume lists to /proc Trond Myklebust
2006-07-06 15:10 ` [PATCH 13/21] FS-Cache: Provide a filesystem-specific sync'able page bit Trond Myklebust
2006-07-06 15:10 ` [PATCH 14/21] FS-Cache: Avoid ENFILE checking for kernel-specific open files Trond Myklebust
2006-07-07  1:56   ` Andrew Morton
2006-07-07  9:54   ` Christoph Hellwig
2006-07-07 14:26     ` Trond Myklebust
2006-07-07 12:36   ` David Howells
2006-07-06 15:10 ` [PATCH 16/21] FS-Cache: Release page->private in failed readahead Trond Myklebust
2006-07-07  1:56   ` Andrew Morton
2006-07-07  9:18   ` David Howells
2006-07-06 15:11 ` [PATCH 17/21] FS-Cache: Make kAFS use FS-Cache Trond Myklebust
2006-07-06 15:11 ` [PATCH 19/21] NFS: Use local caching Trond Myklebust
2006-07-06 15:11 ` [PATCH 20/21] AUTOFS: Make sure all dentries refs are released before calling kill_anon_super() Trond Myklebust
2006-07-07  1:56   ` Andrew Morton
2006-07-07  3:15     ` Ian Kent
2006-07-07  3:23       ` Andrew Morton
2006-07-07  3:50         ` Ian Kent
2006-07-06 15:11 ` [PATCH 21/21] VFS: Destroy the dentries contributed by a superblock on unmounting 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=20060706151030.18779.11669.stgit@lade.trondhjem.org \
    --to=trond.myklebust@netapp.com \
    --cc=akpm@osdl.org \
    --cc=linux-fsdevel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).