mirror of https://github.com/torvalds/linux.git
rxrpc: Remove deadcode
Remove three functions that are no longer used. rxrpc_get_txbuf() last use was removed by 2020's commit5e6ef4f101("rxrpc: Make the I/O thread take over the call and local processor work") rxrpc_kernel_get_epoch() last use was removed by 2020's commit44746355cc("afs: Don't get epoch from a server because it may be ambiguous") rxrpc_kernel_set_max_life() last use was removed by 2023's commitdb099c625b("rxrpc: Fix timeout of a call that hasn't yet been granted a channel") Both of the rxrpc_kernel_* functions were documented. Remove that documentation as well as the code. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Acked-by: David Howells <dhowells@redhat.com> Link: https://patch.msgid.link/20250422235147.146460-1-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
6fdc754b92
commit
39144062ea
|
|
@ -1062,30 +1062,6 @@ The kernel interface functions are as follows:
|
||||||
first function to change. Note that this must be called in TASK_RUNNING
|
first function to change. Note that this must be called in TASK_RUNNING
|
||||||
state.
|
state.
|
||||||
|
|
||||||
(#) Get remote client epoch::
|
|
||||||
|
|
||||||
u32 rxrpc_kernel_get_epoch(struct socket *sock,
|
|
||||||
struct rxrpc_call *call)
|
|
||||||
|
|
||||||
This allows the epoch that's contained in packets of an incoming client
|
|
||||||
call to be queried. This value is returned. The function always
|
|
||||||
successful if the call is still in progress. It shouldn't be called once
|
|
||||||
the call has expired. Note that calling this on a local client call only
|
|
||||||
returns the local epoch.
|
|
||||||
|
|
||||||
This value can be used to determine if the remote client has been
|
|
||||||
restarted as it shouldn't change otherwise.
|
|
||||||
|
|
||||||
(#) Set the maximum lifespan on a call::
|
|
||||||
|
|
||||||
void rxrpc_kernel_set_max_life(struct socket *sock,
|
|
||||||
struct rxrpc_call *call,
|
|
||||||
unsigned long hard_timeout)
|
|
||||||
|
|
||||||
This sets the maximum lifespan on a call to hard_timeout (which is in
|
|
||||||
jiffies). In the event of the timeout occurring, the call will be
|
|
||||||
aborted and -ETIME or -ETIMEDOUT will be returned.
|
|
||||||
|
|
||||||
(#) Apply the RXRPC_MIN_SECURITY_LEVEL sockopt to a socket from within in the
|
(#) Apply the RXRPC_MIN_SECURITY_LEVEL sockopt to a socket from within in the
|
||||||
kernel::
|
kernel::
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,9 +88,6 @@ int rxrpc_kernel_charge_accept(struct socket *sock, rxrpc_notify_rx_t notify_rx,
|
||||||
unsigned int debug_id);
|
unsigned int debug_id);
|
||||||
void rxrpc_kernel_set_tx_length(struct socket *, struct rxrpc_call *, s64);
|
void rxrpc_kernel_set_tx_length(struct socket *, struct rxrpc_call *, s64);
|
||||||
bool rxrpc_kernel_check_life(const struct socket *, const struct rxrpc_call *);
|
bool rxrpc_kernel_check_life(const struct socket *, const struct rxrpc_call *);
|
||||||
u32 rxrpc_kernel_get_epoch(struct socket *, struct rxrpc_call *);
|
|
||||||
void rxrpc_kernel_set_max_life(struct socket *, struct rxrpc_call *,
|
|
||||||
unsigned long);
|
|
||||||
|
|
||||||
int rxrpc_sock_set_min_security_level(struct sock *sk, unsigned int val);
|
int rxrpc_sock_set_min_security_level(struct sock *sk, unsigned int val);
|
||||||
int rxrpc_sock_set_security_keyring(struct sock *, struct key *);
|
int rxrpc_sock_set_security_keyring(struct sock *, struct key *);
|
||||||
|
|
|
||||||
|
|
@ -460,22 +460,6 @@ bool rxrpc_kernel_check_life(const struct socket *sock,
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(rxrpc_kernel_check_life);
|
EXPORT_SYMBOL(rxrpc_kernel_check_life);
|
||||||
|
|
||||||
/**
|
|
||||||
* rxrpc_kernel_get_epoch - Retrieve the epoch value from a call.
|
|
||||||
* @sock: The socket the call is on
|
|
||||||
* @call: The call to query
|
|
||||||
*
|
|
||||||
* Allow a kernel service to retrieve the epoch value from a service call to
|
|
||||||
* see if the client at the other end rebooted.
|
|
||||||
*
|
|
||||||
* Return: The epoch of the call's connection.
|
|
||||||
*/
|
|
||||||
u32 rxrpc_kernel_get_epoch(struct socket *sock, struct rxrpc_call *call)
|
|
||||||
{
|
|
||||||
return call->conn->proto.epoch;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(rxrpc_kernel_get_epoch);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* rxrpc_kernel_set_notifications - Set table of callback operations
|
* rxrpc_kernel_set_notifications - Set table of callback operations
|
||||||
* @sock: The socket to install table upon
|
* @sock: The socket to install table upon
|
||||||
|
|
@ -492,31 +476,6 @@ void rxrpc_kernel_set_notifications(struct socket *sock,
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(rxrpc_kernel_set_notifications);
|
EXPORT_SYMBOL(rxrpc_kernel_set_notifications);
|
||||||
|
|
||||||
/**
|
|
||||||
* rxrpc_kernel_set_max_life - Set maximum lifespan on a call
|
|
||||||
* @sock: The socket the call is on
|
|
||||||
* @call: The call to configure
|
|
||||||
* @hard_timeout: The maximum lifespan of the call in ms
|
|
||||||
*
|
|
||||||
* Set the maximum lifespan of a call. The call will end with ETIME or
|
|
||||||
* ETIMEDOUT if it takes longer than this.
|
|
||||||
*/
|
|
||||||
void rxrpc_kernel_set_max_life(struct socket *sock, struct rxrpc_call *call,
|
|
||||||
unsigned long hard_timeout)
|
|
||||||
{
|
|
||||||
ktime_t delay = ms_to_ktime(hard_timeout), expect_term_by;
|
|
||||||
|
|
||||||
mutex_lock(&call->user_mutex);
|
|
||||||
|
|
||||||
expect_term_by = ktime_add(ktime_get_real(), delay);
|
|
||||||
WRITE_ONCE(call->expect_term_by, expect_term_by);
|
|
||||||
trace_rxrpc_timer_set(call, delay, rxrpc_timer_trace_hard);
|
|
||||||
rxrpc_poke_call(call, rxrpc_call_poke_set_timeout);
|
|
||||||
|
|
||||||
mutex_unlock(&call->user_mutex);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(rxrpc_kernel_set_max_life);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* connect an RxRPC socket
|
* connect an RxRPC socket
|
||||||
* - this just targets it at a specific destination; no actual connection
|
* - this just targets it at a specific destination; no actual connection
|
||||||
|
|
|
||||||
|
|
@ -1503,7 +1503,6 @@ static inline void rxrpc_sysctl_exit(void) {}
|
||||||
extern atomic_t rxrpc_nr_txbuf;
|
extern atomic_t rxrpc_nr_txbuf;
|
||||||
struct rxrpc_txbuf *rxrpc_alloc_data_txbuf(struct rxrpc_call *call, size_t data_size,
|
struct rxrpc_txbuf *rxrpc_alloc_data_txbuf(struct rxrpc_call *call, size_t data_size,
|
||||||
size_t data_align, gfp_t gfp);
|
size_t data_align, gfp_t gfp);
|
||||||
void rxrpc_get_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what);
|
|
||||||
void rxrpc_see_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what);
|
void rxrpc_see_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what);
|
||||||
void rxrpc_put_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what);
|
void rxrpc_put_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,14 +60,6 @@ struct rxrpc_txbuf *rxrpc_alloc_data_txbuf(struct rxrpc_call *call, size_t data_
|
||||||
return txb;
|
return txb;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rxrpc_get_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
|
|
||||||
__refcount_inc(&txb->ref, &r);
|
|
||||||
trace_rxrpc_txbuf(txb->debug_id, txb->call_debug_id, txb->seq, r + 1, what);
|
|
||||||
}
|
|
||||||
|
|
||||||
void rxrpc_see_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what)
|
void rxrpc_see_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what)
|
||||||
{
|
{
|
||||||
int r = refcount_read(&txb->ref);
|
int r = refcount_read(&txb->ref);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue