diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2012-03-07 21:05:19 +0100 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-03-14 11:56:29 -0400 |
commit | 8e2f9fb0b3cb9528f04e7b072163b79fb9fe72f9 (patch) | |
tree | e6b19b3dd7bb0a8e544addaf011ddc621c951717 | |
parent | 7f0dd113bef2a8ba09e7737468ad071652ee6500 (diff) |
fs: namespace: Use cpu_chill() instead of cpu_relax()
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
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | fs/namespace.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index c56378185807..3270cdedfecb 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(); } /* |