fsnotify: fix list walk order
authorEric Paris <eparis@redhat.com>
Sat, 28 Aug 2010 01:24:24 +0000 (21:24 -0400)
committerEric Paris <eparis@redhat.com>
Sat, 28 Aug 2010 01:41:26 +0000 (21:41 -0400)
commitf72adfd540bacc4f6ff57a7d708b1a6c8906bdb4
treedffd43e47284095e98f2a2ab60f965fc68792008
parenta2f13ad0ba5d94b9768c28469b45ca1e81a2b895
fsnotify: fix list walk order

Marks were stored on the inode and vfsmonut mark list in order from
highest memory address to lowest memory address.  The code to walk those
lists thought they were in order from lowest to highest with
unpredictable results when trying to match up marks from each.  It was
possible that extra events would be sent to userspace when inode
marks ignoring events wouldn't get matched with the vfsmount marks.

This problem only affected fanotify when using both vfsmount and inode
marks simultaneously.

Signed-off-by: Eric Paris <eparis@redhat.com>
fs/notify/fsnotify.c