]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
sctp: mark sctp_do_peeloff static
authorChristoph Hellwig <hch@lst.de>
Mon, 26 May 2025 05:47:45 +0000 (07:47 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 28 May 2025 01:18:55 +0000 (18:18 -0700)
sctp_do_peeloff is only used inside of net/sctp/socket.c,
so mark it static.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Xin Long <lucien.xin@gmail.com>
Link: https://patch.msgid.link/20250526054745.2329201-1-hch@lst.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/sctp/sctp.h
net/sctp/socket.c

index d8da764cf6de1ee1a5c9961fb21c57aa7f2eb30c..e96d1bd087f623992b583bd53488b86ee21503ad 100644 (file)
@@ -364,8 +364,6 @@ sctp_assoc_to_state(const struct sctp_association *asoc)
 /* Look up the association by its id.  */
 struct sctp_association *sctp_id2assoc(struct sock *sk, sctp_assoc_t id);
 
-int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp);
-
 /* A macro to walk a list of skbs.  */
 #define sctp_skb_for_each(pos, head, tmp) \
        skb_queue_walk_safe(head, pos, tmp)
index 90b75d4ec32981fc1bb5e3b1c06105074f413355..1e5739858c2067381ccc713756ff56e585d152ad 100644 (file)
@@ -5627,7 +5627,8 @@ static int sctp_getsockopt_autoclose(struct sock *sk, int len, char __user *optv
 }
 
 /* Helper routine to branch off an association to a new socket.  */
-int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp)
+static int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id,
+               struct socket **sockp)
 {
        struct sctp_association *asoc = sctp_id2assoc(sk, id);
        struct sctp_sock *sp = sctp_sk(sk);
@@ -5675,7 +5676,6 @@ int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp)
 
        return err;
 }
-EXPORT_SYMBOL(sctp_do_peeloff);
 
 static int sctp_getsockopt_peeloff_common(struct sock *sk, sctp_peeloff_arg_t *peeloff,
                                          struct file **newfile, unsigned flags)