Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26373
b: refs/heads/master
c: 8dff7c2
h: refs/heads/master
i:
  26371: bc90fe4
v: v3
  • Loading branch information
Ingo Molnar authored and David S. Miller committed Apr 30, 2006
1 parent 1181ef7 commit 81a9d2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a76e07acd0de635122c5e60ccd5e55f9d5082391
refs/heads/master: 8dff7c29707b7514043539f5ab5e0a6eb7bd9dcd
8 changes: 4 additions & 4 deletions trunk/net/xfrm/xfrm_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ int xfrm_register_type(struct xfrm_type *type, unsigned short family)
return -EAFNOSUPPORT;
typemap = afinfo->type_map;

write_lock(&typemap->lock);
write_lock_bh(&typemap->lock);
if (likely(typemap->map[type->proto] == NULL))
typemap->map[type->proto] = type;
else
err = -EEXIST;
write_unlock(&typemap->lock);
write_unlock_bh(&typemap->lock);
xfrm_policy_put_afinfo(afinfo);
return err;
}
Expand All @@ -78,12 +78,12 @@ int xfrm_unregister_type(struct xfrm_type *type, unsigned short family)
return -EAFNOSUPPORT;
typemap = afinfo->type_map;

write_lock(&typemap->lock);
write_lock_bh(&typemap->lock);
if (unlikely(typemap->map[type->proto] != type))
err = -ENOENT;
else
typemap->map[type->proto] = NULL;
write_unlock(&typemap->lock);
write_unlock_bh(&typemap->lock);
xfrm_policy_put_afinfo(afinfo);
return err;
}
Expand Down

0 comments on commit 81a9d2f

Please sign in to comment.