summaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/proto.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 59b214995f2..6d7aef9647d 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -522,14 +522,10 @@ EXPORT_SYMBOL_GPL(dccp_setsockopt);
int compat_dccp_setsockopt(struct sock *sk, int level, int optname,
char __user *optval, int optlen)
{
- if (level != SOL_DCCP) {
- if (inet_csk(sk)->icsk_af_ops->compat_setsockopt)
- return inet_csk(sk)->icsk_af_ops->compat_setsockopt(sk,
- level, optname, optval, optlen);
- else
- return inet_csk(sk)->icsk_af_ops->setsockopt(sk,
- level, optname, optval, optlen);
- }
+ if (level != SOL_DCCP)
+ return inet_csk_compat_setsockopt(sk, level, optname,
+ optval, optlen);
+
return do_dccp_setsockopt(sk, level, optname, optval, optlen);
}
EXPORT_SYMBOL_GPL(compat_dccp_setsockopt);
@@ -619,14 +615,9 @@ EXPORT_SYMBOL_GPL(dccp_getsockopt);
int compat_dccp_getsockopt(struct sock *sk, int level, int optname,
char __user *optval, int __user *optlen)
{
- if (level != SOL_DCCP) {
- if (inet_csk(sk)->icsk_af_ops->compat_setsockopt)
- return inet_csk(sk)->icsk_af_ops->compat_getsockopt(sk,
- level, optname, optval, optlen);
- else
- return inet_csk(sk)->icsk_af_ops->getsockopt(sk,
- level, optname, optval, optlen);
- }
+ if (level != SOL_DCCP)
+ return inet_csk_compat_getsockopt(sk, level, optname,
+ optval, optlen);
return do_dccp_getsockopt(sk, level, optname, optval, optlen);
}
EXPORT_SYMBOL_GPL(compat_dccp_getsockopt);