summaryrefslogtreecommitdiff
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2012-03-07 21:00:34 +0100
committerSteven Rostedt <rostedt@rostedt.homelinux.com>2013-05-20 13:46:56 -0400
commitc721c44b43ee1d8d816b662b59844bff0b2ab1c8 (patch)
tree1a363123f07264bea19d258a6219557f68da2749 /fs/namespace.c
parentc3c4dc56e9ed96b0dffaf692d888cd76db3ccf73 (diff)
downloadlinux-rt-c721c44b43ee1d8d816b662b59844bff0b2ab1c8.tar.gz
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/namespace.c')
-rw-r--r--fs/namespace.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 644dbde12d38..c45da77903a7 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -31,6 +31,7 @@
#include <linux/idr.h>
#include <linux/fs_struct.h>
#include <linux/fsnotify.h>
+#include <linux/delay.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
#include "pnode.h"
@@ -346,7 +347,7 @@ int mnt_want_write(struct vfsmount *mnt)
*/
while (mnt->mnt_flags & MNT_WRITE_HOLD) {
preempt_enable();
- cpu_relax();
+ cpu_chill();
preempt_disable();
}
/*