[IPSEC]: Make x->lastused an unsigned long

Currently x->lastused is u64 which means that it cannot be
read/written atomically on all architectures.  David Miller observed
that the value stored in it is only an unsigned long which is always
atomic.

So based on his suggestion this patch changes the internal
representation from u64 to unsigned long while the user-interface
still refers to it as u64.

Signed-off-by: Herbert Xu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Herbert Xu 2007-11-13 21:47:08 -08:00 • committed by David S. Miller
commit d26f398400
3 changed files with 3 additions and 5 deletions

View file

@ -1986,8 +1986,8 @@ static inline size_t xfrm_sa_len(struct xfrm_state *x)
if (x->coaddr)
l += nla_total_size(sizeof(*x->coaddr));
/* Must count this as this may become non-zero behind our back. */
l += nla_total_size(sizeof(x->lastused));
/* Must count x->lastused as it may become non-zero behind our back. */
l += nla_total_size(sizeof(u64));
return l;
}