diff for duplicates of <20140426163537.GF18016@ZenIV.linux.org.uk> diff --git a/a/1.txt b/N1/1.txt index 2f925f5..e0a86e4 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -18,10 +18,10 @@ in the patch. And those are and > mutex_lock(&item->mutex); -> - BUG_ON(item->refcount = 0); -> + BUG_ON(atomic_read(&item->refcount) = 0); +> - BUG_ON(item->refcount == 0); +> + BUG_ON(atomic_read(&item->refcount) == 0); > BUG_ON(ref->object != item->object); -> - if (--item->refcount = 0) { +> - if (--item->refcount == 0) { > + if (atomic_dec_and_test(&item->refcount)) { > ref->release(ref); > item->object = NULL; diff --git a/a/content_digest b/N1/content_digest index b9ed18e..f512a03 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\0248367.21250.bm@smtp144.mail.ir2.yahoo.com\0" "From\0Al Viro <viro@zeniv.linux.org.uk>\0" "Subject\0Re: [PATCH] drm: make variable named \"refcount\" atomic, like most refcounts in the kernel.\0" - "Date\0Sat, 26 Apr 2014 16:35:37 +0000\0" + "Date\0Sat, 26 Apr 2014 17:35:37 +0100\0" "To\0Lionel Debroux <lionel_debroux@yahoo.fr>\0" "Cc\0linux-kernel@vger.kernel.org" " kernel-janitors@vger.kernel.org\0" @@ -27,10 +27,10 @@ "and\n" "\n" "> \tmutex_lock(&item->mutex);\n" - "> -\tBUG_ON(item->refcount = 0);\n" - "> +\tBUG_ON(atomic_read(&item->refcount) = 0);\n" + "> -\tBUG_ON(item->refcount == 0);\n" + "> +\tBUG_ON(atomic_read(&item->refcount) == 0);\n" "> \tBUG_ON(ref->object != item->object);\n" - "> -\tif (--item->refcount = 0) {\n" + "> -\tif (--item->refcount == 0) {\n" "> +\tif (atomic_dec_and_test(&item->refcount)) {\n" "> \t\tref->release(ref);\n" "> \t\titem->object = NULL;\n" @@ -40,4 +40,4 @@ "\n" NAK, in case it's not obvious from the above... -ddab51adfc40b522a30001f15eb178c3ae613293657b448134b18895d2371f40 +5a34e1ccf819c9149969d5829271f79616d2aac780ca46e8b9aa196ced34e3fa
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.