Loading fs/lockd/host.c +2 −1 Original line number Diff line number Diff line Loading @@ -628,13 +628,14 @@ nlm_gc_hosts(void) struct hlist_head *chain; struct hlist_node *pos, *next; struct nlm_host *host; struct net *net = &init_net; dprintk("lockd: host garbage collection\n"); for_each_host(host, pos, chain, nlm_server_hosts) host->h_inuse = 0; /* Mark all hosts that hold locks, blocks or shares */ nlmsvc_mark_resources(); nlmsvc_mark_resources(net); for_each_host_safe(host, pos, next, chain, nlm_server_hosts) { if (atomic_read(&host->h_count) || host->h_inuse Loading fs/lockd/svcsubs.c +13 −6 Original line number Diff line number Diff line Loading @@ -309,7 +309,8 @@ nlm_release_file(struct nlm_file *file) * Helpers function for resource traversal * * nlmsvc_mark_host: * used by the garbage collector; simply sets h_inuse. * used by the garbage collector; simply sets h_inuse only for those * hosts, which passed network check. * Always returns 0. * * nlmsvc_same_host: Loading @@ -320,11 +321,14 @@ nlm_release_file(struct nlm_file *file) * returns 1 iff the host is a client. * Used by nlmsvc_invalidate_all */ static int nlmsvc_mark_host(void *data, struct nlm_host *dummy) nlmsvc_mark_host(void *data, struct nlm_host *hint) { struct nlm_host *host = data; if ((hint->net == NULL) || (host->net == hint->net)) host->h_inuse = 1; return 0; } Loading Loading @@ -358,10 +362,13 @@ nlmsvc_is_client(void *data, struct nlm_host *dummy) * Mark all hosts that still hold resources */ void nlmsvc_mark_resources(void) nlmsvc_mark_resources(struct net *net) { dprintk("lockd: nlmsvc_mark_resources\n"); nlm_traverse_files(NULL, nlmsvc_mark_host, NULL); struct nlm_host hint; dprintk("lockd: nlmsvc_mark_resources for net %p\n", net); hint.net = net; nlm_traverse_files(&hint, nlmsvc_mark_host, NULL); } /* Loading include/linux/lockd/lockd.h +1 −1 Original line number Diff line number Diff line Loading @@ -279,7 +279,7 @@ void nlmsvc_release_call(struct nlm_rqst *); __be32 nlm_lookup_file(struct svc_rqst *, struct nlm_file **, struct nfs_fh *); void nlm_release_file(struct nlm_file *); void nlmsvc_mark_resources(void); void nlmsvc_mark_resources(struct net *); void nlmsvc_free_host_resources(struct nlm_host *); void nlmsvc_invalidate_all(void); Loading Loading
fs/lockd/host.c +2 −1 Original line number Diff line number Diff line Loading @@ -628,13 +628,14 @@ nlm_gc_hosts(void) struct hlist_head *chain; struct hlist_node *pos, *next; struct nlm_host *host; struct net *net = &init_net; dprintk("lockd: host garbage collection\n"); for_each_host(host, pos, chain, nlm_server_hosts) host->h_inuse = 0; /* Mark all hosts that hold locks, blocks or shares */ nlmsvc_mark_resources(); nlmsvc_mark_resources(net); for_each_host_safe(host, pos, next, chain, nlm_server_hosts) { if (atomic_read(&host->h_count) || host->h_inuse Loading
fs/lockd/svcsubs.c +13 −6 Original line number Diff line number Diff line Loading @@ -309,7 +309,8 @@ nlm_release_file(struct nlm_file *file) * Helpers function for resource traversal * * nlmsvc_mark_host: * used by the garbage collector; simply sets h_inuse. * used by the garbage collector; simply sets h_inuse only for those * hosts, which passed network check. * Always returns 0. * * nlmsvc_same_host: Loading @@ -320,11 +321,14 @@ nlm_release_file(struct nlm_file *file) * returns 1 iff the host is a client. * Used by nlmsvc_invalidate_all */ static int nlmsvc_mark_host(void *data, struct nlm_host *dummy) nlmsvc_mark_host(void *data, struct nlm_host *hint) { struct nlm_host *host = data; if ((hint->net == NULL) || (host->net == hint->net)) host->h_inuse = 1; return 0; } Loading Loading @@ -358,10 +362,13 @@ nlmsvc_is_client(void *data, struct nlm_host *dummy) * Mark all hosts that still hold resources */ void nlmsvc_mark_resources(void) nlmsvc_mark_resources(struct net *net) { dprintk("lockd: nlmsvc_mark_resources\n"); nlm_traverse_files(NULL, nlmsvc_mark_host, NULL); struct nlm_host hint; dprintk("lockd: nlmsvc_mark_resources for net %p\n", net); hint.net = net; nlm_traverse_files(&hint, nlmsvc_mark_host, NULL); } /* Loading
include/linux/lockd/lockd.h +1 −1 Original line number Diff line number Diff line Loading @@ -279,7 +279,7 @@ void nlmsvc_release_call(struct nlm_rqst *); __be32 nlm_lookup_file(struct svc_rqst *, struct nlm_file **, struct nfs_fh *); void nlm_release_file(struct nlm_file *); void nlmsvc_mark_resources(void); void nlmsvc_mark_resources(struct net *); void nlmsvc_free_host_resources(struct nlm_host *); void nlmsvc_invalidate_all(void); Loading