diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2012-05-02 08:08:38 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-05-31 20:29:39 -0400 |
commit | 9793f7c88937e7ac07305ab1af1a519225836823 (patch) | |
tree | 48a4283a15cb0d5a427e722075fe546cc8cdcc53 /fs/lockd | |
parent | c52226daf553b21891f39777d78a54ea4e7e8654 (diff) |
SUNRPC: new svc_bind() routine introduced
This new routine is responsible for service registration in a specified
network context.
The idea is to separate service creation from per-net operations.
Note also: since registering service with svc_bind() can fail, the
service will be destroyed and during destruction it will try to
unregister itself from rpcbind. In this case unregistration has to be
skipped.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/lockd')
-rw-r--r-- | fs/lockd/svc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index 1ead0750cdbb..b7e92ed56885 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c | |||
@@ -324,6 +324,12 @@ int lockd_up(struct net *net) | |||
324 | goto out; | 324 | goto out; |
325 | } | 325 | } |
326 | 326 | ||
327 | error = svc_bind(serv, net); | ||
328 | if (error < 0) { | ||
329 | printk(KERN_WARNING "lockd_up: bind service failed\n"); | ||
330 | goto destroy_and_out; | ||
331 | } | ||
332 | |||
327 | error = make_socks(serv, net); | 333 | error = make_socks(serv, net); |
328 | if (error < 0) | 334 | if (error < 0) |
329 | goto destroy_and_out; | 335 | goto destroy_and_out; |