summaryrefslogtreecommitdiff
path: root/fs/autofs4
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2012-03-07 20:00:34 (GMT)
committerScott Wood <scottwood@freescale.com>2014-05-14 18:38:37 (GMT)
commit587c55f3b7e91d6b5059b6276b3c9c6789e514be (patch)
tree333f48e8692f0fd37b3eae27b8335b416e656518 /fs/autofs4
parenta473767a5b67bc7b0196a61e9e26aec5298c1928 (diff)
downloadlinux-fsl-qoriq-587c55f3b7e91d6b5059b6276b3c9c6789e514be.tar.xz
fs: dcache: Use cpu_chill() in trylock loops
Retry loops on RT might loop forever when the modifying side was preempted. Use cpu_chill() instead of cpu_relax() to let the system make progress. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: stable-rt@vger.kernel.org
Diffstat (limited to 'fs/autofs4')
-rw-r--r--fs/autofs4/autofs_i.h1
-rw-r--r--fs/autofs4/expire.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h
index 3f1128b..c2ed9c4 100644
--- a/fs/autofs4/autofs_i.h
+++ b/fs/autofs4/autofs_i.h
@@ -34,6 +34,7 @@
#include <linux/sched.h>
#include <linux/mount.h>
#include <linux/namei.h>
+#include <linux/delay.h>
#include <asm/current.h>
#include <asm/uaccess.h>
diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c
index 3d9d3f5..b422ad6 100644
--- a/fs/autofs4/expire.c
+++ b/fs/autofs4/expire.c
@@ -157,7 +157,7 @@ again:
parent = p->d_parent;
if (!spin_trylock(&parent->d_lock)) {
spin_unlock(&p->d_lock);
- cpu_relax();
+ cpu_chill();
goto relock;
}
spin_unlock(&p->d_lock);