* [PATCH 11/17] don't bother with vfsmount_lock in mounts_poll()
@ 2013-10-03 6:19 Al Viro
0 siblings, 0 replies; only message in thread
From: Al Viro @ 2013-10-03 6:19 UTC (permalink / raw)
To: torvalds; +Cc: linux-fsdevel, linux-kernel
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>
---
fs/proc_namespace.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c
index 5fe34c3..439406e 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;
}
--
1.7.2.5
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-10-03 6:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-03 6:19 [PATCH 11/17] don't bother with vfsmount_lock in mounts_poll() Al Viro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®