summaryrefslogtreecommitdiffstats
path: root/fs/proc_namespace.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-09-29 16:59:59 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2013-10-25 05:34:59 +0200
commitaab407fc5c0ce63e9fd4a34a790d7290d3e116a1 (patch)
tree8ac53d05b88c74f6749461f31b4ee97a8e832ed4 /fs/proc_namespace.c
parentnamespace.c: get rid of mnt_ghosts (diff)
downloadlinux-aab407fc5c0ce63e9fd4a34a790d7290d3e116a1.tar.xz
linux-aab407fc5c0ce63e9fd4a34a790d7290d3e116a1.zip
don't bother with vfsmount_lock in mounts_poll()
wake_up_interruptible/poll_wait provide sufficient barriers; just use ACCESS_ONCE() to fetch ns->event and that's it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc_namespace.c')
-rw-r--r--fs/proc_namespace.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c
index 5fe34c355e85..439406e081af 100644
--- a/fs/proc_namespace.c
+++ b/fs/proc_namespace.c
@@ -20,15 +20,15 @@ static unsigned mounts_poll(struct file *file, poll_table *wait)
struct proc_mounts *p = proc_mounts(file->private_data);
struct mnt_namespace *ns = p->ns;
unsigned res = POLLIN | POLLRDNORM;
+ int event;
poll_wait(file, &p->ns->poll, wait);
- br_read_lock(&vfsmount_lock);
- if (p->m.poll_event != ns->event) {
- p->m.poll_event = ns->event;
+ event = ACCESS_ONCE(ns->event);
+ if (p->m.poll_event != event) {
+ p->m.poll_event = event;
res |= POLLERR | POLLPRI;
}
- br_read_unlock(&vfsmount_lock);
return res;
}