.. | .. |
---|
14 | 14 | #include <linux/mnt_namespace.h> |
---|
15 | 15 | #include <linux/user_namespace.h> |
---|
16 | 16 | #include <linux/namei.h> |
---|
| 17 | +#include <linux/delay.h> |
---|
17 | 18 | #include <linux/security.h> |
---|
18 | 19 | #include <linux/cred.h> |
---|
19 | 20 | #include <linux/idr.h> |
---|
.. | .. |
---|
328 | 329 | * incremented count after it has set MNT_WRITE_HOLD. |
---|
329 | 330 | */ |
---|
330 | 331 | smp_mb(); |
---|
331 | | - while (READ_ONCE(mnt->mnt.mnt_flags) & MNT_WRITE_HOLD) |
---|
332 | | - cpu_relax(); |
---|
| 332 | + while (READ_ONCE(mnt->mnt.mnt_flags) & MNT_WRITE_HOLD) { |
---|
| 333 | + preempt_enable(); |
---|
| 334 | + cpu_chill(); |
---|
| 335 | + preempt_disable(); |
---|
| 336 | + } |
---|
333 | 337 | /* |
---|
334 | 338 | * After the slowpath clears MNT_WRITE_HOLD, mnt_is_readonly will |
---|
335 | 339 | * be set to match its requirements. So we must not load that until |
---|