Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114346
b: refs/heads/master
c: 26a4140
h: refs/heads/master
v: v3
  • Loading branch information
Chuck Lever authored and J. Bruce Fields committed Oct 4, 2008
1 parent 9a8b485 commit 4946725
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 21 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: 8c3916f4bdf9c8388bd70d0b399b3a43daf2087a
refs/heads/master: 26a414092353590ceaa5955bcb53f863d6ea7549
4 changes: 2 additions & 2 deletions trunk/fs/lockd/clntlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct nlm_host *nlmclnt_init(const struct nlmclnt_initdata *nlm_init)
u32 nlm_version = (nlm_init->nfs_version == 2) ? 1 : 4;
int status;

status = lockd_up(nlm_init->protocol);
status = lockd_up();
if (status < 0)
return ERR_PTR(status);

Expand Down Expand Up @@ -215,7 +215,7 @@ reclaimer(void *ptr)
/* This one ensures that our parent doesn't terminate while the
* reclaim is in progress */
lock_kernel();
lockd_up(0); /* note: this cannot fail as lockd is already running */
lockd_up(); /* note: this cannot fail as lockd is already running */

dprintk("lockd: reclaiming locks for host %s\n", host->h_name);

Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/lockd/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@ static int make_socks(struct svc_serv *serv)
/*
* Bring up the lockd process if it's not already up.
*/
int
lockd_up(int proto) /* Maybe add a 'family' option when IPv6 is supported ?? */
int lockd_up(void)
{
struct svc_serv *serv;
int error = 0;
Expand Down
5 changes: 2 additions & 3 deletions trunk/fs/nfsd/nfsctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,10 +614,9 @@ static ssize_t __write_ports(struct file *file, char *buf, size_t size)
return -EINVAL;
err = nfsd_create_serv();
if (!err) {
int proto = 0;
err = svc_addsock(nfsd_serv, fd, buf, &proto);
err = svc_addsock(nfsd_serv, fd, buf, NULL);
if (err >= 0) {
err = lockd_up(proto);
err = lockd_up();
if (err < 0)
svc_sock_names(buf+strlen(buf)+1, nfsd_serv, buf);
}
Expand Down
19 changes: 7 additions & 12 deletions trunk/fs/nfsd/nfssvc.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,25 +244,20 @@ static int nfsd_init_socks(int port)
if (!list_empty(&nfsd_serv->sv_permsocks))
return 0;

error = lockd_up(IPPROTO_UDP);
if (error >= 0) {
error = svc_create_xprt(nfsd_serv, "udp", port,
error = svc_create_xprt(nfsd_serv, "udp", port,
SVC_SOCK_DEFAULTS);
if (error < 0)
lockd_down();
}
if (error < 0)
return error;

error = lockd_up(IPPROTO_TCP);
if (error >= 0) {
error = svc_create_xprt(nfsd_serv, "tcp", port,
error = svc_create_xprt(nfsd_serv, "tcp", port,
SVC_SOCK_DEFAULTS);
if (error < 0)
lockd_down();
}
if (error < 0)
return error;

error = lockd_up();
if (error < 0)
return error;

return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/lockd/bind.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ extern void nlmclnt_done(struct nlm_host *host);

extern int nlmclnt_proc(struct nlm_host *host, int cmd,
struct file_lock *fl);
extern int lockd_up(int proto);
extern int lockd_up(void);
extern void lockd_down(void);

#endif /* LINUX_LOCKD_BIND_H */

0 comments on commit 4946725

Please sign in to comment.