Commit e327dc88 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

staging: lustre: remove socket_t typedef



Use 'struct socket' like the rest of the kernel does.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: hpdd-discuss <hpdd-discuss@lists.01.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 691bc0eb
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -89,18 +89,18 @@ static inline int __is_po2(unsigned long long val)
int libcfs_ipif_query(char *name, int *up, __u32 *ip, __u32 *mask);
int libcfs_ipif_enumerate(char ***names);
void libcfs_ipif_free_enumeration(char **names, int n);
int libcfs_sock_listen(socket_t **sockp, __u32 ip, int port, int backlog);
int libcfs_sock_accept(socket_t **newsockp, socket_t *sock);
void libcfs_sock_abort_accept(socket_t *sock);
int libcfs_sock_connect(socket_t **sockp, int *fatal,
int libcfs_sock_listen(struct socket **sockp, __u32 ip, int port, int backlog);
int libcfs_sock_accept(struct socket **newsockp, struct socket *sock);
void libcfs_sock_abort_accept(struct socket *sock);
int libcfs_sock_connect(struct socket **sockp, int *fatal,
			__u32 local_ip, int local_port,
			__u32 peer_ip, int peer_port);
int libcfs_sock_setbuf(socket_t *socket, int txbufsize, int rxbufsize);
int libcfs_sock_getbuf(socket_t *socket, int *txbufsize, int *rxbufsize);
int libcfs_sock_getaddr(socket_t *socket, int remote, __u32 *ip, int *port);
int libcfs_sock_write(socket_t *sock, void *buffer, int nob, int timeout);
int libcfs_sock_read(socket_t *sock, void *buffer, int nob, int timeout);
void libcfs_sock_release(socket_t *sock);
int libcfs_sock_setbuf(struct socket *socket, int txbufsize, int rxbufsize);
int libcfs_sock_getbuf(struct socket *socket, int *txbufsize, int *rxbufsize);
int libcfs_sock_getaddr(struct socket *socket, int remote, __u32 *ip, int *port);
int libcfs_sock_write(struct socket *sock, void *buffer, int nob, int timeout);
int libcfs_sock_read(struct socket *sock, void *buffer, int nob, int timeout);
void libcfs_sock_release(struct socket *sock);

/* need both kernel and user-land acceptor */
#define LNET_ACCEPTOR_MIN_RESERVED_PORT    512
+0 −2
Original line number Diff line number Diff line
@@ -47,8 +47,6 @@

#include <net/sock.h>

typedef struct socket   socket_t;

#define SOCK_SNDBUF(so)	 ((so)->sk->sk_sndbuf)
#define SOCK_TEST_NOSPACE(so)   test_bit(SOCK_NOSPACE, &(so)->flags)

+1 −1
Original line number Diff line number Diff line
@@ -829,7 +829,7 @@ void lnet_register_lnd(lnd_t *lnd);
void lnet_unregister_lnd(lnd_t *lnd);
int lnet_set_ip_niaddr(lnet_ni_t *ni);

int lnet_connect(socket_t **sockp, lnet_nid_t peer_nid,
int lnet_connect(struct socket **sockp, lnet_nid_t peer_nid,
		 __u32 local_ip, __u32 peer_ip, int peer_port);
void lnet_connect_console_error(int rc, lnet_nid_t peer_nid,
				__u32 peer_ip, int port);
+1 −1
Original line number Diff line number Diff line
@@ -365,7 +365,7 @@ typedef struct lnet_lnd {
	void (*lnd_query)(struct lnet_ni *ni, lnet_nid_t peer, cfs_time_t *when);

	/* accept a new connection */
	int (*lnd_accept)(struct lnet_ni *ni, socket_t *sock);
	int (*lnd_accept)(struct lnet_ni *ni, struct socket *sock);

} lnd_t;

+2 −2
Original line number Diff line number Diff line
@@ -962,7 +962,7 @@ ksocknal_create_routes(ksock_peer_t *peer, int port,
}

int
ksocknal_accept (lnet_ni_t *ni, socket_t *sock)
ksocknal_accept (lnet_ni_t *ni, struct socket *sock)
{
	ksock_connreq_t    *cr;
	int		 rc;
@@ -1008,7 +1008,7 @@ ksocknal_connecting (ksock_peer_t *peer, __u32 ipaddr)

int
ksocknal_create_conn (lnet_ni_t *ni, ksock_route_t *route,
		      socket_t *sock, int type)
		      struct socket *sock, int type)
{
	rwlock_t		*global_lock = &ksocknal_data.ksnd_global_lock;
	LIST_HEAD     (zombies);
Loading