diff options
Diffstat (limited to 'fs/nfsd/nfssvc.c')
-rw-r--r-- | fs/nfsd/nfssvc.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index f1314c63e823..cdec3993e0d5 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c | |||
@@ -221,18 +221,22 @@ static int nfsd_init_socks(int port) | |||
221 | if (!list_empty(&nfsd_serv->sv_permsocks)) | 221 | if (!list_empty(&nfsd_serv->sv_permsocks)) |
222 | return 0; | 222 | return 0; |
223 | 223 | ||
224 | error = svc_makesock(nfsd_serv, IPPROTO_UDP, port); | ||
225 | if (error < 0) | ||
226 | return error; | ||
227 | error = lockd_up(IPPROTO_UDP); | 224 | error = lockd_up(IPPROTO_UDP); |
225 | if (error >= 0) { | ||
226 | error = svc_makesock(nfsd_serv, IPPROTO_UDP, port); | ||
227 | if (error < 0) | ||
228 | lockd_down(); | ||
229 | } | ||
228 | if (error < 0) | 230 | if (error < 0) |
229 | return error; | 231 | return error; |
230 | 232 | ||
231 | #ifdef CONFIG_NFSD_TCP | 233 | #ifdef CONFIG_NFSD_TCP |
232 | error = svc_makesock(nfsd_serv, IPPROTO_TCP, port); | ||
233 | if (error < 0) | ||
234 | return error; | ||
235 | error = lockd_up(IPPROTO_TCP); | 234 | error = lockd_up(IPPROTO_TCP); |
235 | if (error >= 0) { | ||
236 | error = svc_makesock(nfsd_serv, IPPROTO_TCP, port); | ||
237 | if (error < 0) | ||
238 | lockd_down(); | ||
239 | } | ||
236 | if (error < 0) | 240 | if (error < 0) |
237 | return error; | 241 | return error; |
238 | #endif | 242 | #endif |