mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[IPSEC]: Make xfrm_lookup flags argument a bit-field
This patch introduces an enum for bits in the flags argument of xfrm_lookup. This is so that we can cram more information into it later. Since all current users use just the values 0 and 1, XFRM_LOOKUP_WAIT has been added with the value 1 << 0 to represent the current meaning of flags. The test in __xfrm_lookup has been changed accordingly. Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
3f71c81ac3
commit
815f4e57e9
2 changed files with 6 additions and 1 deletions
|
|
@ -1565,7 +1565,7 @@ restart:
|
|||
xfrm_pol_put(policy);
|
||||
return -EREMOTE;
|
||||
}
|
||||
if (err == -EAGAIN && flags) {
|
||||
if (err == -EAGAIN && (flags & XFRM_LOOKUP_WAIT)) {
|
||||
DECLARE_WAITQUEUE(wait, current);
|
||||
|
||||
add_wait_queue(&km_waitq, &wait);
|
||||
|
|
|
|||
Loading…
Reference in a new issue