NLM: Introduce completion function to match nlmclnt_init
Subsystems (2)
PATCH 2/4 NLM: Introduce completion function to match nlmclnt_init
Introduce the other book-end for nlmclnt_init(). This function is invoked by the NFS client during unmount processing to release the nlm_host struct that was pinned by nlmclnt_init() during mount processing.
---
fs/lockd/clntlock.c | 12 ++++++++++++ include/linux/lockd/bind.h | 1 + 2 files changed, 13 insertions(+), 0 deletions(-)
fs/lockd/clntlock.c +12 -0
@@ -86,6 +86,18 @@ struct nlm_host *nlmclnt_init(struct sockaddr *server_address, }EXPORT_SYMBOL (nlmclnt_init); +/** +* nlmclnt_done - Release resources allocated by nlmclnt_init() +* @host: nlm_host structure reserved by nlmclnt_init() +* +*/ +void nlmclnt_done (struct nlm_host *host) +{ +nlm_release_host (host); +lockd_down (); +} +EXPORT_SYMBOL (nlmclnt_done); +/* * Queue up a lock for blocking so that the GRANTED request can see it */
include/linux/lockd/bind.h +1 -0
@@ -40,6 +40,7 @@ extern struct nlm_host *nlmclnt_init(struct sockaddr *server_address,char *server_name, u32 nfs_version, unsigned short protocol); +extern void nlmclnt_done (struct nlm_host *host);extern int nlmclnt_proc (struct inode *,int ,struct file_lock *);extern int lockd_up (int proto);
A message that is not in the archive (sent off-list or not yet received): 20071220200405.3358.54150.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org
Quoted 3 lines · Chuck Lever
Introduce the other book-end for
nlmclnt_init(). This function is invoked by the NFS client during unmount processing to release thenlm_hoststruct that was pinned bynlmclnt_init()during mount processing.
Does this really need to be a separate patch from the nlmclnt_init?
Furthermore, those EXPORT_SYMBOL() should really be EXPORT_SYMBOL_GPL. We don't want to make this an official ABI.
Trond
A message that is not in the archive (sent off-list or not yet received): 1199397248.1913.15.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org
Hi Trond-
Quoted 9 lines · Trond Myklebust
Quoted 3 lines · Chuck Lever
Introduce the other book-end for
nlmclnt_init(). This function is invoked by the NFS client during unmount processing to release thenlm_hoststruct that was pinned bynlmclnt_init()during mount processing.Does this really need to be a separate patch from the
nlmclnt_init?Furthermore, those
EXPORT_SYMBOL()should really beEXPORT_SYMBOL_GPL. We don't want to make this an official ABI.
Should I change nlmclnt_proc() to use EXPORT_SYMBOL_GPL then?
--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com
Quoted 10 lines · Chuck Lever
Hi Trond-
Quoted 7 lines · Trond Myklebust
Quoted 5 lines · Chuck Lever
Introduce the other book-end for
nlmclnt_init(). This function is invoked
by the NFS client during unmount processing to release thenlm_hoststruct
that was pinned bynlmclnt_init()during mount processing.
Quoted 6 lines
Quoted 4 lines
Does this really need to be a separate patch from the
nlmclnt_init?Furthermore, those
EXPORT_SYMBOL()should really beEXPORT_SYMBOL_GPL. We don't want to make this an official ABI.Should I change
nlmclnt_proc()to useEXPORT_SYMBOL_GPLthen?
Please do, yes. As you can see from the git tree and latest NFS_ALL, I'm also restricting the sunrpc interfaces to _GPL-only. We don't want these interfaces to be used by out-of-tree modules.
Cheers
Trond