diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-11-13 21:47:08 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 14:53:52 -0800 |
commit | d26f398400311982d2433debae85746c348b7d58 (patch) | |
tree | cd1fd0dfbd5a51428dc92ea3dbbb864205a27fa8 /net/xfrm/xfrm_user.c | |
parent | 0ebea8ef3559b545c37b016f44e84c3b33e47c39 (diff) | |
download | kernel_goldelico_gta04-d26f398400311982d2433debae85746c348b7d58.zip kernel_goldelico_gta04-d26f398400311982d2433debae85746c348b7d58.tar.gz kernel_goldelico_gta04-d26f398400311982d2433debae85746c348b7d58.tar.bz2 |
[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 <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_user.c')
-rw-r--r-- | net/xfrm/xfrm_user.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index c4f6419..6424e53 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -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; } |