Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NLM: Remove unused argument from svc_addsock() function

Clean up: The svc_addsock() function no longer uses its "proto"
argument, so remove it.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

authored by

Chuck Lever and committed by
J. Bruce Fields
29373913 26a41409

+3 -8
+1 -1
fs/nfsd/nfsctl.c
··· 614 614 return -EINVAL; 615 615 err = nfsd_create_serv(); 616 616 if (!err) { 617 - err = svc_addsock(nfsd_serv, fd, buf, NULL); 617 + err = svc_addsock(nfsd_serv, fd, buf); 618 618 if (err >= 0) { 619 619 err = lockd_up(); 620 620 if (err < 0)
+1 -4
include/linux/sunrpc/svcsock.h
··· 39 39 void svc_drop(struct svc_rqst *); 40 40 void svc_sock_update_bufs(struct svc_serv *serv); 41 41 int svc_sock_names(char *buf, struct svc_serv *serv, char *toclose); 42 - int svc_addsock(struct svc_serv *serv, 43 - int fd, 44 - char *name_return, 45 - int *proto); 42 + int svc_addsock(struct svc_serv *serv, int fd, char *name_return); 46 43 void svc_init_xprt_sock(void); 47 44 void svc_cleanup_xprt_sock(void); 48 45
+1 -3
net/sunrpc/svcsock.c
··· 1167 1167 1168 1168 int svc_addsock(struct svc_serv *serv, 1169 1169 int fd, 1170 - char *name_return, 1171 - int *proto) 1170 + char *name_return) 1172 1171 { 1173 1172 int err = 0; 1174 1173 struct socket *so = sockfd_lookup(fd, &err); ··· 1202 1203 sockfd_put(so); 1203 1204 return err; 1204 1205 } 1205 - if (proto) *proto = so->sk->sk_protocol; 1206 1206 return one_sock_name(name_return, svsk); 1207 1207 } 1208 1208 EXPORT_SYMBOL_GPL(svc_addsock);