mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
Merge branch 'for-3.5-take-2' of git://linux-nfs.org/~bfields/linux
Pull nfsd update from Bruce Fields. * 'for-3.5-take-2' of git://linux-nfs.org/~bfields/linux: (23 commits) nfsd: trivial: use SEEK_SET instead of 0 in vfs_llseek SUNRPC: split upcall function to extract reusable parts nfsd: allocate id-to-name and name-to-id caches in per-net operations. nfsd: make name-to-id cache allocated per network namespace context nfsd: make id-to-name cache allocated per network namespace context nfsd: pass network context to idmap init/exit functions nfsd: allocate export and expkey caches in per-net operations. nfsd: make expkey cache allocated per network namespace context nfsd: make export cache allocated per network namespace context nfsd: pass pointer to export cache down to stack wherever possible. nfsd: pass network context to export caches init/shutdown routines Lockd: pass network namespace to creation and destruction routines NFSd: remove hard-coded dereferences to name-to-id and id-to-name caches nfsd: pass pointer to expkey cache down to stack wherever possible. nfsd: use hash table from cache detail in nfsd export seq ops nfsd: pass svc_export_cache pointer as private data to "exports" seq file ops nfsd: use exp_put() for svc_export_cache put nfsd: use cache detail pointer from svc_export structure on cache put nfsd: add link to owner cache detail to svc_export structure nfsd: use passed cache_detail pointer expkey_parse() ...
This commit is contained in:
commit
a00b6151a2
16 changed files with 322 additions and 209 deletions
|
|
@ -56,7 +56,7 @@ struct nlm_host *nlmclnt_init(const struct nlmclnt_initdata *nlm_init)
|
|||
u32 nlm_version = (nlm_init->nfs_version == 2) ? 1 : 4;
|
||||
int status;
|
||||
|
||||
status = lockd_up();
|
||||
status = lockd_up(nlm_init->net);
|
||||
if (status < 0)
|
||||
return ERR_PTR(status);
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ struct nlm_host *nlmclnt_init(const struct nlmclnt_initdata *nlm_init)
|
|||
nlm_init->hostname, nlm_init->noresvport,
|
||||
nlm_init->net);
|
||||
if (host == NULL) {
|
||||
lockd_down();
|
||||
lockd_down(nlm_init->net);
|
||||
return ERR_PTR(-ENOLCK);
|
||||
}
|
||||
|
||||
|
|
@ -80,8 +80,10 @@ EXPORT_SYMBOL_GPL(nlmclnt_init);
|
|||
*/
|
||||
void nlmclnt_done(struct nlm_host *host)
|
||||
{
|
||||
struct net *net = host->net;
|
||||
|
||||
nlmclnt_release_host(host);
|
||||
lockd_down();
|
||||
lockd_down(net);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nlmclnt_done);
|
||||
|
||||
|
|
@ -220,11 +222,12 @@ reclaimer(void *ptr)
|
|||
struct nlm_wait *block;
|
||||
struct file_lock *fl, *next;
|
||||
u32 nsmstate;
|
||||
struct net *net = host->net;
|
||||
|
||||
allow_signal(SIGKILL);
|
||||
|
||||
down_write(&host->h_rwsem);
|
||||
lockd_up(); /* note: this cannot fail as lockd is already running */
|
||||
lockd_up(net); /* note: this cannot fail as lockd is already running */
|
||||
|
||||
dprintk("lockd: reclaiming locks for host %s\n", host->h_name);
|
||||
|
||||
|
|
@ -275,6 +278,6 @@ restart:
|
|||
|
||||
/* Release host handle after use */
|
||||
nlmclnt_release_host(host);
|
||||
lockd_down();
|
||||
lockd_down(net);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -295,11 +295,10 @@ static void lockd_down_net(struct net *net)
|
|||
/*
|
||||
* Bring up the lockd process if it's not already up.
|
||||
*/
|
||||
int lockd_up(void)
|
||||
int lockd_up(struct net *net)
|
||||
{
|
||||
struct svc_serv *serv;
|
||||
int error = 0;
|
||||
struct net *net = current->nsproxy->net_ns;
|
||||
|
||||
mutex_lock(&nlmsvc_mutex);
|
||||
/*
|
||||
|
|
@ -378,12 +377,12 @@ EXPORT_SYMBOL_GPL(lockd_up);
|
|||
* Decrement the user count and bring down lockd if we're the last.
|
||||
*/
|
||||
void
|
||||
lockd_down(void)
|
||||
lockd_down(struct net *net)
|
||||
{
|
||||
mutex_lock(&nlmsvc_mutex);
|
||||
if (nlmsvc_users) {
|
||||
if (--nlmsvc_users) {
|
||||
lockd_down_net(current->nsproxy->net_ns);
|
||||
lockd_down_net(net);
|
||||
goto out;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue