Commit e52fc91d authored by James Simmons's avatar James Simmons Committed by Greg Kroah-Hartman

staging:lustre: remove useless libcfs_sock_release

There is no reason to have a one line exported function
libcfs_sock_release. Instead we can call sock_release directly.
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7da308e1
...@@ -80,7 +80,6 @@ int libcfs_sock_getbuf(struct socket *socket, int *txbufsize, int *rxbufsize); ...@@ -80,7 +80,6 @@ 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_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_write(struct socket *sock, void *buffer, int nob, int timeout);
int libcfs_sock_read(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 */ /* need both kernel and user-land acceptor */
#define LNET_ACCEPTOR_MIN_RESERVED_PORT 512 #define LNET_ACCEPTOR_MIN_RESERVED_PORT 512
......
...@@ -1386,7 +1386,7 @@ ksocknal_create_conn(lnet_ni_t *ni, ksock_route_t *route, ...@@ -1386,7 +1386,7 @@ ksocknal_create_conn(lnet_ni_t *ni, ksock_route_t *route,
LIBCFS_FREE(conn, sizeof(*conn)); LIBCFS_FREE(conn, sizeof(*conn));
failed_0: failed_0:
libcfs_sock_release(sock); sock_release(sock);
return rc; return rc;
} }
......
...@@ -519,7 +519,7 @@ ksocknal_connsock_decref(ksock_conn_t *conn) ...@@ -519,7 +519,7 @@ ksocknal_connsock_decref(ksock_conn_t *conn)
LASSERT(atomic_read(&conn->ksnc_sock_refcount) > 0); LASSERT(atomic_read(&conn->ksnc_sock_refcount) > 0);
if (atomic_dec_and_test(&conn->ksnc_sock_refcount)) { if (atomic_dec_and_test(&conn->ksnc_sock_refcount)) {
LASSERT(conn->ksnc_closing); LASSERT(conn->ksnc_closing);
libcfs_sock_release(conn->ksnc_sock); sock_release(conn->ksnc_sock);
conn->ksnc_sock = NULL; conn->ksnc_sock = NULL;
ksocknal_finalize_zcreq(conn); ksocknal_finalize_zcreq(conn);
} }
......
...@@ -197,7 +197,7 @@ lnet_connect(struct socket **sockp, lnet_nid_t peer_nid, ...@@ -197,7 +197,7 @@ lnet_connect(struct socket **sockp, lnet_nid_t peer_nid,
goto failed; goto failed;
failed_sock: failed_sock:
libcfs_sock_release(sock); sock_release(sock);
failed: failed:
lnet_connect_console_error(rc, peer_nid, peer_ip, peer_port); lnet_connect_console_error(rc, peer_nid, peer_ip, peer_port);
return rc; return rc;
...@@ -379,7 +379,7 @@ lnet_acceptor(void *arg) ...@@ -379,7 +379,7 @@ lnet_acceptor(void *arg)
/* maybe we're waken up with libcfs_sock_abort_accept() */ /* maybe we're waken up with libcfs_sock_abort_accept() */
if (lnet_acceptor_state.pta_shutdown) { if (lnet_acceptor_state.pta_shutdown) {
libcfs_sock_release(newsock); sock_release(newsock);
break; break;
} }
...@@ -410,10 +410,10 @@ lnet_acceptor(void *arg) ...@@ -410,10 +410,10 @@ lnet_acceptor(void *arg)
continue; continue;
failed: failed:
libcfs_sock_release(newsock); sock_release(newsock);
} }
libcfs_sock_release(lnet_acceptor_state.pta_sock); sock_release(lnet_acceptor_state.pta_sock);
lnet_acceptor_state.pta_sock = NULL; lnet_acceptor_state.pta_sock = NULL;
CDEBUG(D_NET, "Acceptor stopping\n"); CDEBUG(D_NET, "Acceptor stopping\n");
......
...@@ -614,11 +614,3 @@ libcfs_sock_connect (struct socket **sockp, int *fatal, ...@@ -614,11 +614,3 @@ libcfs_sock_connect (struct socket **sockp, int *fatal,
} }
EXPORT_SYMBOL(libcfs_sock_connect); EXPORT_SYMBOL(libcfs_sock_connect);
void
libcfs_sock_release (struct socket *sock)
{
sock_release(sock);
}
EXPORT_SYMBOL(libcfs_sock_release);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment