diff for duplicates of <20140426170305.GA17562@mguzik.redhat.com> diff --git a/a/1.txt b/N1/1.txt index 16a5b62..aa15f09 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -14,10 +14,10 @@ On Sat, Apr 26, 2014 at 06:06:15PM +0200, Lionel Debroux wrote: > [snip] > 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 c1fe20a..b79efda 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\0248367.21250.bm@smtp144.mail.ir2.yahoo.com\0" "From\0Mateusz Guzik <mguzik@redhat.com>\0" "Subject\0Re: [PATCH] drm: make variable named \"refcount\" atomic, like most refcounts in the kernel.\0" - "Date\0Sat, 26 Apr 2014 17:03:06 +0000\0" + "Date\0Sat, 26 Apr 2014 19:03:06 +0200\0" "To\0Lionel Debroux <lionel_debroux@yahoo.fr>\0" "Cc\0linux-kernel@vger.kernel.org" " kernel-janitors@vger.kernel.org\0" @@ -23,10 +23,10 @@ "> \n" "[snip]\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" @@ -45,4 +45,4 @@ "-- \n" Mateusz Guzik -475c4259c93c3034c170f01e5690593b4b6e1354e2813d7aabc953b6ef6f09fa +a2055d89b78332c04f4f7027a5fcddefd1b8d0b8a7803af9dff3cb2b005c0051
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.