diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2012-03-07 21:00:34 +0100 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-04-10 16:41:07 -0500 |
commit | 20decb543187374cda4666de96e1bd390b5d5a07 (patch) | |
tree | 67042681e588258e99bc528fad543b1ee2e3c6a5 /fs/autofs4 | |
parent | f16e2a70d6b09add4156f9ec850597efd00b21fd (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>
Cc: stable-rt@vger.kernel.org
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 eb1cc92cd67d..c5a1ce74ff6b 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 1feb68ecef95..859badd23da6 100644 --- a/fs/autofs4/expire.c +++ b/fs/autofs4/expire.c @@ -171,7 +171,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); |