summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Mc Guire <der.herr@hofr.at>2013-12-02 04:03:52 (GMT)
committerScott Wood <scottwood@freescale.com>2014-04-10 00:19:59 (GMT)
commite6e541ec2b28242ffd01f8641e18474b386e4473 (patch)
tree99c8c2d3b1df71b289199b4429fd583425f6a880
parent0ce2cbb8fc86b080f134f3d976cd87e08ed7ebea (diff)
downloadlinux-fsl-qoriq-e6e541ec2b28242ffd01f8641e18474b386e4473.tar.xz
seqlock: consolidate spin_lock/unlock waiting with spin_unlock_wait
since c2f21ce ("locking: Implement new raw_spinlock") include/linux/spinlock.h includes spin_unlock_wait() to wait for a concurren holder of a lock. this patch just moves over to that API. spin_unlock_wait covers both raw_spinlock_t and spinlock_t so it should be safe here as well. the added rt-variant of read_seqbegin in include/linux/seqlock.h that is being modified, was introduced by patch: seqlock-prevent-rt-starvation.patch behavior should be unchanged. Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-rw-r--r--include/linux/seqlock.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index 142c0f7..019a936 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -236,8 +236,7 @@ repeat:
* Take the lock and let the writer proceed (i.e. evtl
* boost it), otherwise we could loop here forever.
*/
- spin_lock(&sl->lock);
- spin_unlock(&sl->lock);
+ spin_unlock_wait(&sl->lock);
goto repeat;
}
return ret;