Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63e9b66e authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of git://linux-nfs.org/~bfields/linux

* 'for-linus' of git://linux-nfs.org/~bfields/linux: (100 commits)
  SUNRPC: RPC program information is stored in unsigned integers
  SUNRPC: Move exported symbol definitions after function declaration part 2
  NLM: tear down RPC clients in nlm_shutdown_hosts
  SUNRPC: spin svc_rqst initialization to its own function
  nfsd: more careful input validation in nfsctl write methods
  lockd: minor log message fix
  knfsd: don't bother mapping putrootfh enoent to eperm
  rdma: makefile
  rdma: ONCRPC RDMA protocol marshalling
  rdma: SVCRDMA sendto
  rdma: SVCRDMA recvfrom
  rdma: SVCRDMA Core Transport Services
  rdma: SVCRDMA Transport Module
  rdma: SVCRMDA Header File
  svc: Add svc_xprt_names service to replace svc_sock_names
  knfsd: Support adding transports by writing portlist file
  svc: Add svc API that queries for a transport instance
  svc: Add /proc/sys/sunrpc/transport files
  svc: Add transport hdr size for defer/revisit
  svc: Move the xprt independent code to the svc_xprt.c file
  ...
parents 687fcdf7 ea339d46
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2247,7 +2247,7 @@ P: J. Bruce Fields
M:	bfields@fieldses.org
P:	Neil Brown
M:	neilb@suse.de
L:	nfs@lists.sourceforge.net
L:	linux-nfs@vger.kernel.org
W:	http://nfs.sourceforge.net/
S:	Supported

+2 −0
Original line number Diff line number Diff line
@@ -1674,6 +1674,8 @@ config NFSD
	select CRYPTO_MD5 if NFSD_V4
	select CRYPTO if NFSD_V4
	select FS_POSIX_ACL if NFSD_V4
	select PROC_FS if NFSD_V4
	select PROC_FS if SUNRPC_GSS
	help
	  If you want your Linux box to act as an NFS *server*, so that other
	  computers on your local network which support NFS can access certain
+17 −9
Original line number Diff line number Diff line
@@ -34,10 +34,10 @@ static DEFINE_MUTEX(nlm_host_mutex);

static void			nlm_gc_hosts(void);
static struct nsm_handle *	__nsm_find(const struct sockaddr_in *,
					const char *, int, int);
					const char *, unsigned int, int);
static struct nsm_handle *	nsm_find(const struct sockaddr_in *sin,
					 const char *hostname,
					 int hostname_len);
					 unsigned int hostname_len);

/*
 * Common host lookup routine for server & client
@@ -45,7 +45,8 @@ static struct nsm_handle * nsm_find(const struct sockaddr_in *sin,
static struct nlm_host *
nlm_lookup_host(int server, const struct sockaddr_in *sin,
		int proto, int version, const char *hostname,
		int hostname_len, const struct sockaddr_in *ssin)
		unsigned int hostname_len,
		const struct sockaddr_in *ssin)
{
	struct hlist_head *chain;
	struct hlist_node *pos;
@@ -176,7 +177,7 @@ nlm_destroy_host(struct nlm_host *host)
 */
struct nlm_host *
nlmclnt_lookup_host(const struct sockaddr_in *sin, int proto, int version,
			const char *hostname, int hostname_len)
			const char *hostname, unsigned int hostname_len)
{
	struct sockaddr_in ssin = {0};

@@ -189,7 +190,7 @@ nlmclnt_lookup_host(const struct sockaddr_in *sin, int proto, int version,
 */
struct nlm_host *
nlmsvc_lookup_host(struct svc_rqst *rqstp,
			const char *hostname, int hostname_len)
			const char *hostname, unsigned int hostname_len)
{
	struct sockaddr_in ssin = {0};

@@ -307,7 +308,8 @@ void nlm_release_host(struct nlm_host *host)
 * Release all resources held by that peer.
 */
void nlm_host_rebooted(const struct sockaddr_in *sin,
				const char *hostname, int hostname_len,
				const char *hostname,
				unsigned int hostname_len,
				u32 new_state)
{
	struct hlist_head *chain;
@@ -377,8 +379,13 @@ nlm_shutdown_hosts(void)
	/* First, make all hosts eligible for gc */
	dprintk("lockd: nuking all hosts...\n");
	for (chain = nlm_hosts; chain < nlm_hosts + NLM_HOST_NRHASH; ++chain) {
		hlist_for_each_entry(host, pos, chain, h_hash)
		hlist_for_each_entry(host, pos, chain, h_hash) {
			host->h_expires = jiffies - 1;
			if (host->h_rpcclnt) {
				rpc_shutdown_client(host->h_rpcclnt);
				host->h_rpcclnt = NULL;
			}
		}
	}

	/* Then, perform a garbage collection pass */
@@ -449,7 +456,7 @@ static DEFINE_MUTEX(nsm_mutex);

static struct nsm_handle *
__nsm_find(const struct sockaddr_in *sin,
		const char *hostname, int hostname_len,
		const char *hostname, unsigned int hostname_len,
		int create)
{
	struct nsm_handle *nsm = NULL;
@@ -503,7 +510,8 @@ __nsm_find(const struct sockaddr_in *sin,
}

static struct nsm_handle *
nsm_find(const struct sockaddr_in *sin, const char *hostname, int hostname_len)
nsm_find(const struct sockaddr_in *sin, const char *hostname,
	 unsigned int hostname_len)
{
	return __nsm_find(sin, hostname, hostname_len, 1);
}
+17 −22
Original line number Diff line number Diff line
@@ -219,19 +219,6 @@ lockd(struct svc_rqst *rqstp)
	module_put_and_exit(0);
}


static int find_socket(struct svc_serv *serv, int proto)
{
	struct svc_sock *svsk;
	int found = 0;
	list_for_each_entry(svsk, &serv->sv_permsocks, sk_list)
		if (svsk->sk_sk->sk_protocol == proto) {
			found = 1;
			break;
		}
	return found;
}

/*
 * Make any sockets that are needed but not present.
 * If nlm_udpport or nlm_tcpport were set as module
@@ -240,17 +227,25 @@ static int find_socket(struct svc_serv *serv, int proto)
static int make_socks(struct svc_serv *serv, int proto)
{
	static int warned;
	struct svc_xprt *xprt;
	int err = 0;

	if (proto == IPPROTO_UDP || nlm_udpport)
		if (!find_socket(serv, IPPROTO_UDP))
			err = svc_makesock(serv, IPPROTO_UDP, nlm_udpport,
	if (proto == IPPROTO_UDP || nlm_udpport) {
		xprt = svc_find_xprt(serv, "udp", 0, 0);
		if (!xprt)
			err = svc_create_xprt(serv, "udp", nlm_udpport,
					      SVC_SOCK_DEFAULTS);
	if (err >= 0 && (proto == IPPROTO_TCP || nlm_tcpport))
		if (!find_socket(serv, IPPROTO_TCP))
			err = svc_makesock(serv, IPPROTO_TCP, nlm_tcpport,
		else
			svc_xprt_put(xprt);
	}
	if (err >= 0 && (proto == IPPROTO_TCP || nlm_tcpport)) {
		xprt = svc_find_xprt(serv, "tcp", 0, 0);
		if (!xprt)
			err = svc_create_xprt(serv, "tcp", nlm_tcpport,
					      SVC_SOCK_DEFAULTS);

		else
			svc_xprt_put(xprt);
	}
	if (err >= 0) {
		warned = 0;
		err = 0;
+12 −8
Original line number Diff line number Diff line
@@ -84,6 +84,7 @@ nlm4svc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp,
{
	struct nlm_host	*host;
	struct nlm_file	*file;
	int rc = rpc_success;

	dprintk("lockd: TEST4        called\n");
	resp->cookie = argp->cookie;
@@ -91,7 +92,7 @@ nlm4svc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp,
	/* Don't accept test requests during grace period */
	if (nlmsvc_grace_period) {
		resp->status = nlm_lck_denied_grace_period;
		return rpc_success;
		return rc;
	}

	/* Obtain client and file */
@@ -101,12 +102,13 @@ nlm4svc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp,
	/* Now check for conflicting locks */
	resp->status = nlmsvc_testlock(rqstp, file, &argp->lock, &resp->lock, &resp->cookie);
	if (resp->status == nlm_drop_reply)
		return rpc_drop_reply;

		rc = rpc_drop_reply;
	else
		dprintk("lockd: TEST4        status %d\n", ntohl(resp->status));

	nlm_release_host(host);
	nlm_release_file(file);
	return rpc_success;
	return rc;
}

static __be32
@@ -115,6 +117,7 @@ nlm4svc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
{
	struct nlm_host	*host;
	struct nlm_file	*file;
	int rc = rpc_success;

	dprintk("lockd: LOCK          called\n");

@@ -123,7 +126,7 @@ nlm4svc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
	/* Don't accept new lock requests during grace period */
	if (nlmsvc_grace_period && !argp->reclaim) {
		resp->status = nlm_lck_denied_grace_period;
		return rpc_success;
		return rc;
	}

	/* Obtain client and file */
@@ -146,12 +149,13 @@ nlm4svc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
	resp->status = nlmsvc_lock(rqstp, file, &argp->lock,
					argp->block, &argp->cookie);
	if (resp->status == nlm_drop_reply)
		return rpc_drop_reply;

		rc = rpc_drop_reply;
	else
		dprintk("lockd: LOCK         status %d\n", ntohl(resp->status));

	nlm_release_host(host);
	nlm_release_file(file);
	return rpc_success;
	return rc;
}

static __be32
Loading