summaryrefslogtreecommitdiffstats
path: root/lib/kref.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-04-30 12:38:01 +1000
committerPaul Mackerras <paulus@samba.org>2007-04-30 12:38:01 +1000
commit49e1900d4cc2e7bcecb681fe60f0990bec2dcce8 (patch)
tree253801ebf57e0a23856a2c7be129c2c178f62fdf /lib/kref.c
parent34f6d749c0a328817d5e36274e53121c1db734dc (diff)
parentb9099ff63c75216d6ca10bce5a1abcd9293c27e6 (diff)
downloadop-kernel-dev-49e1900d4cc2e7bcecb681fe60f0990bec2dcce8.zip
op-kernel-dev-49e1900d4cc2e7bcecb681fe60f0990bec2dcce8.tar.gz
Merge branch 'linux-2.6' into for-2.6.22
Diffstat (limited to 'lib/kref.c')
-rw-r--r--lib/kref.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/kref.c b/lib/kref.c
index 0d07cc3..a6dc3ec 100644
--- a/lib/kref.c
+++ b/lib/kref.c
@@ -21,6 +21,7 @@
void kref_init(struct kref *kref)
{
atomic_set(&kref->refcount,1);
+ smp_mb();
}
/**
@@ -31,6 +32,7 @@ void kref_get(struct kref *kref)
{
WARN_ON(!atomic_read(&kref->refcount));
atomic_inc(&kref->refcount);
+ smp_mb__after_atomic_inc();
}
/**
OpenPOWER on IntegriCloud