diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2012-03-07 21:00:34 +0100 |
---|---|---|
committer | Anders Roxell <anders.roxell@linaro.org> | 2015-08-17 08:59:32 +0200 |
commit | 3f4553f234c9bea8ac2f7deee699e102108848aa (patch) | |
tree | c4f4b784d4b6b3dd1fe3968d3da1851768774866 /fs/autofs4 | |
parent | 999a577ba51b0a3d95c05f16029ab0f05c6180ea (diff) |
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>
Diffstat (limited to 'fs/autofs4')
-rw-r--r-- | fs/autofs4/autofs_i.h | 1 | ||||
-rw-r--r-- | fs/autofs4/expire.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/fs/autofs4/autofs_i.h b/fs/autofs4/autofs_i.h index 5b700ef1e59d..63cf85daab68 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 1cebc3c52fa5..d487fa27add5 100644 --- a/fs/autofs4/expire.c +++ b/fs/autofs4/expire.c @@ -150,7 +150,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); |