fs: seq_file - add event counter to simplify poll() support

Moving the event counter into the dynamically allocated 'struc seq_file'
allows poll() support without the need to allocate its own tracking
structure.

All current users are switched over to use the new counter.

Requested-by: Andrew Morton [email protected]
Acked-by: NeilBrown <[email protected]>
Tested-by: Lucas De Marchi [email protected]
Signed-off-by: Kay Sievers <[email protected]>
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
Kay Sievers 2011-07-12 20:48:39 +02:00 • committed by Al Viro
commit f15146380d
6 changed files with 20 additions and 43 deletions

View file

@ -934,8 +934,8 @@ int mnt_had_events(struct proc_mounts *p)
int res = 0;
br_read_lock(vfsmount_lock);
if (p->event != ns->event) {
p->event = ns->event;
if (p->m.poll_event != ns->event) {
p->m.poll_event = ns->event;
res = 1;
}
br_read_unlock(vfsmount_lock);