proc: mounts_poll() make consistent to mdstat_poll
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Thu, 9 Apr 2009 04:57:59 +0000 (13:57 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 16 Apr 2009 23:17:10 +0000 (16:17 -0700)
commit31b07093c44a7a442394d44423e21d783f5523b8
tree8569f8450dd2e7560a36a751faeee8d402c031ca
parent1af3557abdef34ee036a6de4cb79e24468544b8d
proc: mounts_poll() make consistent to mdstat_poll

In recently sysfs_poll discussion, Neil Brown pointed out /proc/mounts
also should be fixed.

SUSv3 says "Regular files shall always poll TRUE for reading and
writing".  see
http://www.opengroup.org/onlinepubs/009695399/functions/poll.html

Then, mounts_poll()'s default should be "POLLIN | POLLRDNORM".  it mean
always readable.

In addition, event trigger should use "POLLERR | POLLPRI" instead
POLLERR.  it makes consistent to mdstat_poll() and sysfs_poll(). and,
select(2) can handle POLLPRI easily.

Reported-by: Neil Brown <neilb@suse.de>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ram Pai <linuxram@us.ibm.com>
Cc: Miklos Szeredi <mszeredi@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/proc/base.c