From mboxrd@z Thu Jan 1 00:00:00 1970 From: Trond Myklebust Subject: [PATCH 04/21] NFS: Fix NFS4 callback up/down prototypes Date: Thu, 06 Jul 2006 11:10:30 -0400 Message-ID: <20060706151030.18779.11669.stgit@lade.trondhjem.org> References: <20060706145424.18779.55583.stgit@lade.trondhjem.org> Content-Type: text/plain; charset=utf-8; format=fixed Content-Transfer-Encoding: 8bit Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from c-69-241-229-183.hsd1.mi.comcast.net ([69.241.229.183]:64977 "EHLO lade.trondhjem.org") by vger.kernel.org with ESMTP id S1030307AbWGFPLL (ORCPT ); Thu, 6 Jul 2006 11:11:11 -0400 To: Andrew Morton In-Reply-To: <20060706145424.18779.55583.stgit@lade.trondhjem.org> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org From: David Howells 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 Signed-off-by: Trond Myklebust --- 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;