diff for duplicates of <1459508695-14915-3-git-send-email-mhocko@kernel.org>
diff --git a/a/1.txt b/N1/1.txt
index 3d2e582..478ed0c 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -28,7 +28,7 @@ index a5104bebd1eb..f6c951c7a875 100644
@@ -37,7 +35,6 @@ static inline int __down_read_trylock(struct rw_semaphore *sem)
while ((tmp = sem->count) >= 0) {
- if (tmp = cmpxchg(&sem->count, tmp,
+ if (tmp == cmpxchg(&sem->count, tmp,
tmp + RWSEM_ACTIVE_READ_BIAS)) {
- smp_wmb();
return 1;
@@ -38,7 +38,7 @@ index a5104bebd1eb..f6c951c7a875 100644
tmp = atomic_add_return(RWSEM_ACTIVE_WRITE_BIAS,
(atomic_t *)(&sem->count));
-- if (tmp = RWSEM_ACTIVE_WRITE_BIAS)
+- if (tmp == RWSEM_ACTIVE_WRITE_BIAS)
- smp_wmb();
- else
+ if (tmp != RWSEM_ACTIVE_WRITE_BIAS)
@@ -50,7 +50,7 @@ index a5104bebd1eb..f6c951c7a875 100644
tmp = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE,
RWSEM_ACTIVE_WRITE_BIAS);
- smp_wmb();
- return tmp = RWSEM_UNLOCKED_VALUE;
+ return tmp == RWSEM_UNLOCKED_VALUE;
}
@@ -76,7 +70,6 @@ static inline void __up_read(struct rw_semaphore *sem)
@@ -59,7 +59,7 @@ index a5104bebd1eb..f6c951c7a875 100644
- smp_wmb();
tmp = atomic_dec_return((atomic_t *)(&sem->count));
- if (tmp < -1 && (tmp & RWSEM_ACTIVE_MASK) = 0)
+ if (tmp < -1 && (tmp & RWSEM_ACTIVE_MASK) == 0)
rwsem_wake(sem);
@@ -87,7 +80,6 @@ static inline void __up_read(struct rw_semaphore *sem)
*/
@@ -102,7 +102,7 @@ index 249619e7e7f2..593483f6e1ff 100644
@@ -42,7 +40,6 @@ static inline int __down_read_trylock(struct rw_semaphore *sem)
while ((tmp = sem->count) >= 0) {
- if (tmp = cmpxchg(&sem->count, tmp,
+ if (tmp == cmpxchg(&sem->count, tmp,
tmp + RWSEM_ACTIVE_READ_BIAS)) {
- smp_wmb();
return 1;
@@ -112,7 +112,7 @@ index 249619e7e7f2..593483f6e1ff 100644
tmp = atomic_add_return(RWSEM_ACTIVE_WRITE_BIAS,
(atomic_t *)(&sem->count));
-- if (tmp = RWSEM_ACTIVE_WRITE_BIAS)
+- if (tmp == RWSEM_ACTIVE_WRITE_BIAS)
- smp_wmb();
- else
+ if (tmp != RWSEM_ACTIVE_WRITE_BIAS)
@@ -124,7 +124,7 @@ index 249619e7e7f2..593483f6e1ff 100644
tmp = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE,
RWSEM_ACTIVE_WRITE_BIAS);
- smp_wmb();
- return tmp = RWSEM_UNLOCKED_VALUE;
+ return tmp == RWSEM_UNLOCKED_VALUE;
}
@@ -81,7 +75,6 @@ static inline void __up_read(struct rw_semaphore *sem)
@@ -133,7 +133,7 @@ index 249619e7e7f2..593483f6e1ff 100644
- smp_wmb();
tmp = atomic_sub_return(1,(atomic_t *)(&sem->count));
- if (tmp < -1 && (tmp & RWSEM_ACTIVE_MASK) = 0)
+ if (tmp < -1 && (tmp & RWSEM_ACTIVE_MASK) == 0)
rwsem_wake(sem);
@@ -92,7 +85,6 @@ static inline void __up_read(struct rw_semaphore *sem)
*/
diff --git a/a/content_digest b/N1/content_digest
index 6a8e0bc..ace030e 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -8,7 +8,7 @@
"Subject\0[PATCH 02/11] locking, rwsem: drop explicit memory barriers\0"
]
[
- "Date\0Fri, 01 Apr 2016 11:04:46 +0000\0"
+ "Date\0Fri, 1 Apr 2016 13:04:46 +0200\0"
]
[
"To\0LKML <linux-kernel\@vger.kernel.org>\0"
@@ -70,7 +70,7 @@
" \n",
"\@\@ -37,7 +35,6 \@\@ static inline int __down_read_trylock(struct rw_semaphore *sem)\n",
" \twhile ((tmp = sem->count) >= 0) {\n",
- " \t\tif (tmp = cmpxchg(&sem->count, tmp,\n",
+ " \t\tif (tmp == cmpxchg(&sem->count, tmp,\n",
" \t\t\t\t tmp + RWSEM_ACTIVE_READ_BIAS)) {\n",
"-\t\t\tsmp_wmb();\n",
" \t\t\treturn 1;\n",
@@ -80,7 +80,7 @@
" \n",
" \ttmp = atomic_add_return(RWSEM_ACTIVE_WRITE_BIAS,\n",
" \t\t\t\t(atomic_t *)(&sem->count));\n",
- "-\tif (tmp = RWSEM_ACTIVE_WRITE_BIAS)\n",
+ "-\tif (tmp == RWSEM_ACTIVE_WRITE_BIAS)\n",
"-\t\tsmp_wmb();\n",
"-\telse\n",
"+\tif (tmp != RWSEM_ACTIVE_WRITE_BIAS)\n",
@@ -92,7 +92,7 @@
" \ttmp = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE,\n",
" \t\t RWSEM_ACTIVE_WRITE_BIAS);\n",
"-\tsmp_wmb();\n",
- " \treturn tmp = RWSEM_UNLOCKED_VALUE;\n",
+ " \treturn tmp == RWSEM_UNLOCKED_VALUE;\n",
" }\n",
" \n",
"\@\@ -76,7 +70,6 \@\@ static inline void __up_read(struct rw_semaphore *sem)\n",
@@ -101,7 +101,7 @@
" \n",
"-\tsmp_wmb();\n",
" \ttmp = atomic_dec_return((atomic_t *)(&sem->count));\n",
- " \tif (tmp < -1 && (tmp & RWSEM_ACTIVE_MASK) = 0)\n",
+ " \tif (tmp < -1 && (tmp & RWSEM_ACTIVE_MASK) == 0)\n",
" \t\trwsem_wake(sem);\n",
"\@\@ -87,7 +80,6 \@\@ static inline void __up_read(struct rw_semaphore *sem)\n",
" */\n",
@@ -144,7 +144,7 @@
" \n",
"\@\@ -42,7 +40,6 \@\@ static inline int __down_read_trylock(struct rw_semaphore *sem)\n",
" \twhile ((tmp = sem->count) >= 0) {\n",
- " \t\tif (tmp = cmpxchg(&sem->count, tmp,\n",
+ " \t\tif (tmp == cmpxchg(&sem->count, tmp,\n",
" \t\t\t\t tmp + RWSEM_ACTIVE_READ_BIAS)) {\n",
"-\t\t\tsmp_wmb();\n",
" \t\t\treturn 1;\n",
@@ -154,7 +154,7 @@
" \n",
" \ttmp = atomic_add_return(RWSEM_ACTIVE_WRITE_BIAS,\n",
" \t\t\t\t(atomic_t *)(&sem->count));\n",
- "-\tif (tmp = RWSEM_ACTIVE_WRITE_BIAS)\n",
+ "-\tif (tmp == RWSEM_ACTIVE_WRITE_BIAS)\n",
"-\t\tsmp_wmb();\n",
"-\telse\n",
"+\tif (tmp != RWSEM_ACTIVE_WRITE_BIAS)\n",
@@ -166,7 +166,7 @@
" \ttmp = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE,\n",
" \t\t RWSEM_ACTIVE_WRITE_BIAS);\n",
"-\tsmp_wmb();\n",
- " \treturn tmp = RWSEM_UNLOCKED_VALUE;\n",
+ " \treturn tmp == RWSEM_UNLOCKED_VALUE;\n",
" }\n",
" \n",
"\@\@ -81,7 +75,6 \@\@ static inline void __up_read(struct rw_semaphore *sem)\n",
@@ -175,7 +175,7 @@
" \n",
"-\tsmp_wmb();\n",
" \ttmp = atomic_sub_return(1,(atomic_t *)(&sem->count));\n",
- " \tif (tmp < -1 && (tmp & RWSEM_ACTIVE_MASK) = 0)\n",
+ " \tif (tmp < -1 && (tmp & RWSEM_ACTIVE_MASK) == 0)\n",
" \t\trwsem_wake(sem);\n",
"\@\@ -92,7 +85,6 \@\@ static inline void __up_read(struct rw_semaphore *sem)\n",
" */\n",
@@ -205,4 +205,4 @@
"2.8.0.rc3"
]
-b40a6d805390b7f623bfaaa43b55075d5c1f43ea8526fec54ea8983832509104
+3fc07940e6d8d02431dba97a37dfecd6943d63cadf12228fb26ef4d58181541a
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.