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>
This commit is contained in:
parent
aba809cf09
commit
aab407fc5c
1 changed files with 4 additions and 4 deletions
|
@ -20,15 +20,15 @@ static unsigned mounts_poll(struct file *file, poll_table *wait)
|
||||||
struct proc_mounts *p = proc_mounts(file->private_data);
|
struct proc_mounts *p = proc_mounts(file->private_data);
|
||||||
struct mnt_namespace *ns = p->ns;
|
struct mnt_namespace *ns = p->ns;
|
||||||
unsigned res = POLLIN | POLLRDNORM;
|
unsigned res = POLLIN | POLLRDNORM;
|
||||||
|
int event;
|
||||||
|
|
||||||
poll_wait(file, &p->ns->poll, wait);
|
poll_wait(file, &p->ns->poll, wait);
|
||||||
|
|
||||||
br_read_lock(&vfsmount_lock);
|
event = ACCESS_ONCE(ns->event);
|
||||||
if (p->m.poll_event != ns->event) {
|
if (p->m.poll_event != event) {
|
||||||
p->m.poll_event = ns->event;
|
p->m.poll_event = event;
|
||||||
res |= POLLERR | POLLPRI;
|
res |= POLLERR | POLLPRI;
|
||||||
}
|
}
|
||||||
br_read_unlock(&vfsmount_lock);
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue