diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-05-06 14:59:18 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-05-06 14:59:18 -0400 |
commit | 5047f09b56d0bc3c21aec9cb16de60283da645c6 (patch) | |
tree | 09a07554b933c3bb912ce3bfc0ea7c7e1f16041c /net/xfrm/xfrm_state.c | |
parent | c0f1fe00c3923135b2c2f443448585482da8a53e (diff) | |
parent | 5528e568a760442e0ec8fd2dea1f0791875a066b (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'net/xfrm/xfrm_state.c')
-rw-r--r-- | net/xfrm/xfrm_state.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 3dc3e1f3b7aa..93a2f36ad3db 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c | |||
@@ -1061,7 +1061,7 @@ int xfrm_state_register_afinfo(struct xfrm_state_afinfo *afinfo) | |||
1061 | return -EINVAL; | 1061 | return -EINVAL; |
1062 | if (unlikely(afinfo->family >= NPROTO)) | 1062 | if (unlikely(afinfo->family >= NPROTO)) |
1063 | return -EAFNOSUPPORT; | 1063 | return -EAFNOSUPPORT; |
1064 | write_lock(&xfrm_state_afinfo_lock); | 1064 | write_lock_bh(&xfrm_state_afinfo_lock); |
1065 | if (unlikely(xfrm_state_afinfo[afinfo->family] != NULL)) | 1065 | if (unlikely(xfrm_state_afinfo[afinfo->family] != NULL)) |
1066 | err = -ENOBUFS; | 1066 | err = -ENOBUFS; |
1067 | else { | 1067 | else { |
@@ -1069,7 +1069,7 @@ int xfrm_state_register_afinfo(struct xfrm_state_afinfo *afinfo) | |||
1069 | afinfo->state_byspi = xfrm_state_byspi; | 1069 | afinfo->state_byspi = xfrm_state_byspi; |
1070 | xfrm_state_afinfo[afinfo->family] = afinfo; | 1070 | xfrm_state_afinfo[afinfo->family] = afinfo; |
1071 | } | 1071 | } |
1072 | write_unlock(&xfrm_state_afinfo_lock); | 1072 | write_unlock_bh(&xfrm_state_afinfo_lock); |
1073 | return err; | 1073 | return err; |
1074 | } | 1074 | } |
1075 | EXPORT_SYMBOL(xfrm_state_register_afinfo); | 1075 | EXPORT_SYMBOL(xfrm_state_register_afinfo); |
@@ -1081,7 +1081,7 @@ int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo) | |||
1081 | return -EINVAL; | 1081 | return -EINVAL; |
1082 | if (unlikely(afinfo->family >= NPROTO)) | 1082 | if (unlikely(afinfo->family >= NPROTO)) |
1083 | return -EAFNOSUPPORT; | 1083 | return -EAFNOSUPPORT; |
1084 | write_lock(&xfrm_state_afinfo_lock); | 1084 | write_lock_bh(&xfrm_state_afinfo_lock); |
1085 | if (likely(xfrm_state_afinfo[afinfo->family] != NULL)) { | 1085 | if (likely(xfrm_state_afinfo[afinfo->family] != NULL)) { |
1086 | if (unlikely(xfrm_state_afinfo[afinfo->family] != afinfo)) | 1086 | if (unlikely(xfrm_state_afinfo[afinfo->family] != afinfo)) |
1087 | err = -EINVAL; | 1087 | err = -EINVAL; |
@@ -1091,7 +1091,7 @@ int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo) | |||
1091 | afinfo->state_bydst = NULL; | 1091 | afinfo->state_bydst = NULL; |
1092 | } | 1092 | } |
1093 | } | 1093 | } |
1094 | write_unlock(&xfrm_state_afinfo_lock); | 1094 | write_unlock_bh(&xfrm_state_afinfo_lock); |
1095 | return err; | 1095 | return err; |
1096 | } | 1096 | } |
1097 | EXPORT_SYMBOL(xfrm_state_unregister_afinfo); | 1097 | EXPORT_SYMBOL(xfrm_state_unregister_afinfo); |