summaryrefslogtreecommitdiff
path: root/net/sunrpc
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-07-31 09:53:56 +0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-10-07 18:14:54 -0400
commitc9f6cde6e26ef98ee9c4b6288b126ac9c580d88b (patch)
tree03dcbf503e457df3adeb4f9442fc6fc061fca057 /net/sunrpc
parentfd08d7e9d196ca49afcce0181f1f0ca68f241aa2 (diff)
downloadlinux-3.10-c9f6cde6e26ef98ee9c4b6288b126ac9c580d88b.tar.gz
linux-3.10-c9f6cde6e26ef98ee9c4b6288b126ac9c580d88b.tar.bz2
linux-3.10-c9f6cde6e26ef98ee9c4b6288b126ac9c580d88b.zip
sunrpc: do not pin sunrpc module in the memory
Basically, try_module_get here are pretty useless. Any other module using this API will pin sunrpc in memory due using exported symbols. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/xprt.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 99a52aabe33..29e401bb612 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -108,13 +108,10 @@ int xprt_register_transport(struct xprt_class *transport)
goto out;
}
- result = -EINVAL;
- if (try_module_get(THIS_MODULE)) {
- list_add_tail(&transport->list, &xprt_list);
- printk(KERN_INFO "RPC: Registered %s transport module.\n",
- transport->name);
- result = 0;
- }
+ list_add_tail(&transport->list, &xprt_list);
+ printk(KERN_INFO "RPC: Registered %s transport module.\n",
+ transport->name);
+ result = 0;
out:
spin_unlock(&xprt_list_lock);
@@ -143,7 +140,6 @@ int xprt_unregister_transport(struct xprt_class *transport)
"RPC: Unregistered %s transport module.\n",
transport->name);
list_del_init(&transport->list);
- module_put(THIS_MODULE);
goto out;
}
}