Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186359
b: refs/heads/master
c: 3749829
h: refs/heads/master
i:
  186357: 55ac738
  186355: d11fe7b
  186351: 9ee5828
v: v3
  • Loading branch information
Chuck Lever authored and J. Bruce Fields committed Jan 27, 2010
1 parent c56fb75 commit 441f4c1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 68717908155a9dcd4161f4d730fea478712d9794
refs/heads/master: 37498292aa97658a5d0a9bb84699ce8c1016bb74
18 changes: 17 additions & 1 deletion trunk/fs/nfsd/nfsctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,7 @@ static ssize_t __write_ports_delfd(char *buf)
static ssize_t __write_ports_addxprt(char *buf)
{
char transport[16];
struct svc_xprt *xprt;
int port, err;

if (sscanf(buf, "%15s %4u", transport, &port) != 2)
Expand All @@ -1003,8 +1004,23 @@ static ssize_t __write_ports_addxprt(char *buf)
err = svc_create_xprt(nfsd_serv, transport,
PF_INET, port, SVC_SOCK_ANONYMOUS);
if (err < 0)
return err;
goto out_err;

err = svc_create_xprt(nfsd_serv, transport,
PF_INET6, port, SVC_SOCK_ANONYMOUS);
if (err < 0 && err != -EAFNOSUPPORT)
goto out_close;
return 0;
out_close:
xprt = svc_find_xprt(nfsd_serv, transport, PF_INET, port);
if (xprt != NULL) {
svc_close_xprt(xprt);
svc_xprt_put(xprt);
}
out_err:
/* Decrease the count, but don't shut down the service */
nfsd_serv->sv_nrthreads--;
return err;
}

/*
Expand Down

0 comments on commit 441f4c1

Please sign in to comment.