From 855aeba34047f53e3665b0c3bcac80fe87ee2f7b Mon Sep 17 00:00:00 2001 From: Kirill Tkhai Date: Mon, 26 Mar 2018 12:28:47 +0300 Subject: net: Convert rpcsec_gss_net_ops These pernet_operations initialize and destroy sunrpc_net_id refered per-net items. Only used global list is cache_list, and accesses already serialized. sunrpc_destroy_cache_detail() check for list_empty() without cache_list_lock, but when it's called from unregister_pernet_subsys(), there can't be callers in parallel, so we won't miss list_empty() in this case. Signed-off-by: Kirill Tkhai Acked-by: Anna Schumaker Signed-off-by: David S. Miller --- net/sunrpc/auth_gss/auth_gss.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 9463af4..44f939c 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c @@ -2063,6 +2063,7 @@ static __net_exit void rpcsec_gss_exit_net(struct net *net) static struct pernet_operations rpcsec_gss_net_ops = { .init = rpcsec_gss_init_net, .exit = rpcsec_gss_exit_net, + .async = true, }; /* -- cgit v1.1 From 5e804a6077dccf154047a1ffe5b5232dce579659 Mon Sep 17 00:00:00 2001 From: Kirill Tkhai Date: Mon, 26 Mar 2018 12:28:55 +0300 Subject: net: Convert sunrpc_net_ops These pernet_operations look similar to rpcsec_gss_net_ops, they just create and destroy another caches. So, they also can be async. Signed-off-by: Kirill Tkhai Acked-by: Anna Schumaker Signed-off-by: David S. Miller --- net/sunrpc/sunrpc_syms.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c index 56f9eff..68287e9 100644 --- a/net/sunrpc/sunrpc_syms.c +++ b/net/sunrpc/sunrpc_syms.c @@ -79,6 +79,7 @@ static struct pernet_operations sunrpc_net_ops = { .exit = sunrpc_exit_net, .id = &sunrpc_net_id, .size = sizeof(struct sunrpc_net), + .async = true, }; static int __init -- cgit v1.1 From 436de500948e1176ef013468c2630f83bb72a901 Mon Sep 17 00:00:00 2001 From: Kirill Tkhai Date: Mon, 26 Mar 2018 12:29:04 +0300 Subject: net: Convert nfs4_dns_resolver_ops These pernet_operations look similar to rpcsec_gss_net_ops, they just create and destroy another cache. Also they create and destroy directory. So, they also look safe to be async. Signed-off-by: Kirill Tkhai Acked-by: Anna Schumaker Signed-off-by: David S. Miller --- fs/nfs/dns_resolve.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/nfs/dns_resolve.c b/fs/nfs/dns_resolve.c index 060c658..e90bd69 100644 --- a/fs/nfs/dns_resolve.c +++ b/fs/nfs/dns_resolve.c @@ -410,6 +410,7 @@ static void nfs4_dns_net_exit(struct net *net) static struct pernet_operations nfs4_dns_resolver_ops = { .init = nfs4_dns_net_init, .exit = nfs4_dns_net_exit, + .async = true, }; static int rpc_pipefs_event(struct notifier_block *nb, unsigned long event, -- cgit v1.1 From dbf7bb4437260605fffcaff9aad3514163209db1 Mon Sep 17 00:00:00 2001 From: Kirill Tkhai Date: Mon, 26 Mar 2018 12:29:13 +0300 Subject: net: Convert nfs4blocklayout_net_ops These pernet_operations create and destroy per-net pipe and dentry, and they seem safe to be marked as async. Signed-off-by: Kirill Tkhai Acked-by: Anna Schumaker Signed-off-by: David S. Miller --- fs/nfs/blocklayout/rpc_pipefs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/nfs/blocklayout/rpc_pipefs.c b/fs/nfs/blocklayout/rpc_pipefs.c index 9fb067a6..ef9fa11 100644 --- a/fs/nfs/blocklayout/rpc_pipefs.c +++ b/fs/nfs/blocklayout/rpc_pipefs.c @@ -261,6 +261,7 @@ static void nfs4blocklayout_net_exit(struct net *net) static struct pernet_operations nfs4blocklayout_net_ops = { .init = nfs4blocklayout_net_init, .exit = nfs4blocklayout_net_exit, + .async = true, }; int __init bl_init_pipefs(void) -- cgit v1.1