aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r--fs/proc/base.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 8dce96c331f8..6ab0bd692968 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -650,15 +650,17 @@ static unsigned mounts_poll(struct file *file, poll_table *wait)
650 struct proc_mounts *p = file->private_data; 650 struct proc_mounts *p = file->private_data;
651 struct mnt_namespace *ns = p->ns; 651 struct mnt_namespace *ns = p->ns;
652 unsigned res = POLLIN | POLLRDNORM; 652 unsigned res = POLLIN | POLLRDNORM;
653 int cpu = get_cpu();
654 put_cpu();
653 655
654 poll_wait(file, &ns->poll, wait); 656 poll_wait(file, &ns->poll, wait);
655 657
656 spin_lock(&vfsmount_lock); 658 vfsmount_read_lock(cpu);
657 if (p->event != ns->event) { 659 if (p->event != ns->event) {
658 p->event = ns->event; 660 p->event = ns->event;
659 res |= POLLERR | POLLPRI; 661 res |= POLLERR | POLLPRI;
660 } 662 }
661 spin_unlock(&vfsmount_lock); 663 vfsmount_read_unlock(cpu);
662 664
663 return res; 665 return res;
664} 666}