1 From 1a7fcab0fb255e03887ede8f164f9c28d5ec2ca4 Mon Sep 17 00:00:00 2001
2 From: Thomas Gleixner <tglx@linutronix.de>
3 Date: Sun, 19 Jul 2009 08:44:27 -0500
4 Subject: [PATCH 145/366] fs: namespace preemption fix
6 On RT we cannot loop with preemption disabled here as
7 mnt_make_readonly() might have been preempted. We can safely enable
8 preemption while waiting for MNT_WRITE_HOLD to be cleared. Safe on !RT
11 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 fs/namespace.c | 5 ++++-
14 1 file changed, 4 insertions(+), 1 deletion(-)
16 diff --git a/fs/namespace.c b/fs/namespace.c
17 index 5be02a0..97f7f9f 100644
20 @@ -353,8 +353,11 @@ int __mnt_want_write(struct vfsmount *m)
21 * incremented count after it has set MNT_WRITE_HOLD.
24 - while (ACCESS_ONCE(mnt->mnt.mnt_flags) & MNT_WRITE_HOLD)
25 + while (ACCESS_ONCE(mnt->mnt.mnt_flags) & MNT_WRITE_HOLD) {
31 * After the slowpath clears MNT_WRITE_HOLD, mnt_is_readonly will
32 * be set to match its requirements. So we must not load that until