Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82420
b: refs/heads/master
c: df95a9d
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields committed Feb 1, 2008
1 parent c00f5a3 commit 4bb6902
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d5c3428b2cb26d605fddc4878f4fcc03c23df89f
refs/heads/master: df95a9d4fb91d819d3fb55dd437056df59e7f15e
6 changes: 2 additions & 4 deletions trunk/fs/nfsd/export.c
Original file line number Diff line number Diff line change
Expand Up @@ -1670,10 +1670,8 @@ nfsd_export_shutdown(void)

exp_writelock();

if (cache_unregister(&svc_expkey_cache))
printk(KERN_ERR "nfsd: failed to unregister expkey cache\n");
if (cache_unregister(&svc_export_cache))
printk(KERN_ERR "nfsd: failed to unregister export cache\n");
cache_unregister(&svc_expkey_cache);
cache_unregister(&svc_export_cache);
svcauth_unix_purge();

exp_writeunlock();
Expand Down
6 changes: 2 additions & 4 deletions trunk/fs/nfsd/nfs4idmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,8 @@ nfsd_idmap_init(void)
void
nfsd_idmap_shutdown(void)
{
if (cache_unregister(&idtoname_cache))
printk(KERN_ERR "nfsd: failed to unregister idtoname cache\n");
if (cache_unregister(&nametoid_cache))
printk(KERN_ERR "nfsd: failed to unregister nametoid cache\n");
cache_unregister(&idtoname_cache);
cache_unregister(&nametoid_cache);
}

/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/sunrpc/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ extern void cache_flush(void);
extern void cache_purge(struct cache_detail *detail);
#define NEVER (0x7FFFFFFF)
extern void cache_register(struct cache_detail *cd);
extern int cache_unregister(struct cache_detail *cd);
extern void cache_unregister(struct cache_detail *cd);

extern void qword_add(char **bpp, int *lp, char *str);
extern void qword_addhex(char **bpp, int *lp, char *buf, int blen);
Expand Down
6 changes: 2 additions & 4 deletions trunk/net/sunrpc/auth_gss/svcauth_gss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1396,9 +1396,7 @@ gss_svc_init(void)
void
gss_svc_shutdown(void)
{
if (cache_unregister(&rsc_cache))
printk(KERN_ERR "auth_rpcgss: failed to unregister rsc cache\n");
if (cache_unregister(&rsi_cache))
printk(KERN_ERR "auth_rpcgss: failed to unregister rsi cache\n");
cache_unregister(&rsc_cache);
cache_unregister(&rsi_cache);
svc_auth_unregister(RPC_AUTH_GSS);
}
8 changes: 5 additions & 3 deletions trunk/net/sunrpc/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,15 +343,15 @@ void cache_register(struct cache_detail *cd)
schedule_delayed_work(&cache_cleaner, 0);
}

int cache_unregister(struct cache_detail *cd)
void cache_unregister(struct cache_detail *cd)
{
cache_purge(cd);
spin_lock(&cache_list_lock);
write_lock(&cd->hash_lock);
if (cd->entries || atomic_read(&cd->inuse)) {
write_unlock(&cd->hash_lock);
spin_unlock(&cache_list_lock);
return -EBUSY;
goto out;
}
if (current_detail == cd)
current_detail = NULL;
Expand All @@ -373,7 +373,9 @@ int cache_unregister(struct cache_detail *cd)
/* module must be being unloaded so its safe to kill the worker */
cancel_delayed_work_sync(&cache_cleaner);
}
return 0;
return;
out:
printk(KERN_ERR "nfsd: failed to unregister %s cache\n", cd->name);
}

/* clean cache tries to find something to clean
Expand Down
6 changes: 2 additions & 4 deletions trunk/net/sunrpc/sunrpc_syms.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,8 @@ cleanup_sunrpc(void)
cleanup_socket_xprt();
unregister_rpc_pipefs();
rpc_destroy_mempool();
if (cache_unregister(&ip_map_cache))
printk(KERN_ERR "sunrpc: failed to unregister ip_map cache\n");
if (cache_unregister(&unix_gid_cache))
printk(KERN_ERR "sunrpc: failed to unregister unix_gid cache\n");
cache_unregister(&ip_map_cache);
cache_unregister(&unix_gid_cache);
#ifdef RPC_DEBUG
rpc_unregister_sysctl();
#endif
Expand Down

0 comments on commit 4bb6902

Please sign in to comment.