From 31ff0f0408069970440cc607e9fce0aecad9be5b Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 15 Jan 2014 00:14:01 +0800 Subject: [PATCH] namespace use 64 bit message seqnum --- connection.c | 3 +-- namespace.c | 2 +- namespace.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/connection.c b/connection.c index b1afa0e..818f440 100644 --- a/connection.c +++ b/connection.c @@ -672,11 +672,10 @@ int kdbus_conn_kmsg_send(struct kdbus_ep *ep, /* assign namespace-global message sequence number */ BUG_ON(kmsg->seq > 0); - kmsg->seq = atomic_inc_return(&ep->bus->ns->msg_seq_last); + kmsg->seq = atomic64_inc_return(&ep->bus->ns->msg_seq_last); /* non-kernel senders append credentials/metadata */ if (conn_src) { - ret = kdbus_meta_new(&kmsg->meta); if (ret < 0) return ret; diff --git a/namespace.c b/namespace.c index 3fc0bc5..76b5df7 100644 --- a/namespace.c +++ b/namespace.c @@ -216,7 +216,7 @@ int kdbus_ns_new(struct kdbus_ns *parent, const char *name, umode_t mode, n->mode = mode; idr_init(&n->idr); mutex_init(&n->lock); - atomic_set(&n->msg_seq_last, 0); + atomic64_set(&n->msg_seq_last, 0); mutex_lock(&kdbus_subsys_lock); diff --git a/namespace.h b/namespace.h index e0730d6..a5dbb9b 100644 --- a/namespace.h +++ b/namespace.h @@ -58,7 +58,7 @@ struct kdbus_ns { struct device *dev; struct mutex lock; u64 bus_seq_last; - atomic_t msg_seq_last; + atomic64_t msg_seq_last; struct list_head ns_entry; struct list_head bus_list; }; -- 2.34.1