From 3c6e122046b9d84063c1088fbeecb186e6c2bf21 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Thu, 17 Dec 2009 21:24:27 -0500 Subject: [PATCH] --- yaml --- r: 207666 b: refs/heads/master c: 2504c5d63b811b71bbaa8d5d5af163e698f4df1f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/namespace.c | 4 ++++ trunk/fs/notify/fsnotify.c | 4 +--- trunk/include/linux/mount.h | 6 +++++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 6ba432e20aad..0d26f5cb347e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ba643f04cdda170215c8820acd3e201936fc512d +refs/heads/master: 2504c5d63b811b71bbaa8d5d5af163e698f4df1f diff --git a/trunk/fs/namespace.c b/trunk/fs/namespace.c index 88058de59c7c..a2d681a6b5e9 100644 --- a/trunk/fs/namespace.c +++ b/trunk/fs/namespace.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include "pnode.h" @@ -150,6 +151,9 @@ struct vfsmount *alloc_vfsmnt(const char *name) INIT_LIST_HEAD(&mnt->mnt_share); INIT_LIST_HEAD(&mnt->mnt_slave_list); INIT_LIST_HEAD(&mnt->mnt_slave); +#ifdef CONFIG_FSNOTIFY + INIT_HLIST_HEAD(&mnt->mnt_fsnotify_marks); +#endif #ifdef CONFIG_SMP mnt->mnt_writers = alloc_percpu(int); if (!mnt->mnt_writers) diff --git a/trunk/fs/notify/fsnotify.c b/trunk/fs/notify/fsnotify.c index 60e84fd338dd..e0bf86953e1b 100644 --- a/trunk/fs/notify/fsnotify.c +++ b/trunk/fs/notify/fsnotify.c @@ -163,9 +163,7 @@ static bool needed_by_vfsmount(__u32 test_mask, struct vfsmount *mnt) if (!mnt) return false; - /* hook in this when mnt->mnt_fsnotify_mask is defined */ - /* return (test_mask & path->mnt->mnt_fsnotify_mask); */ - return false; + return (test_mask & mnt->mnt_fsnotify_mask); } /* * This is the main call to fsnotify. The VFS calls into hook specific functions diff --git a/trunk/include/linux/mount.h b/trunk/include/linux/mount.h index 4bd05474d11d..907210bd9f9c 100644 --- a/trunk/include/linux/mount.h +++ b/trunk/include/linux/mount.h @@ -56,7 +56,11 @@ struct vfsmount { struct list_head mnt_mounts; /* list of children, anchored here */ struct list_head mnt_child; /* and going through their mnt_child */ int mnt_flags; - /* 4 bytes hole on 64bits arches */ + /* 4 bytes hole on 64bits arches without fsnotify */ +#ifdef CONFIG_FSNOTIFY + __u32 mnt_fsnotify_mask; + struct hlist_head mnt_fsnotify_marks; +#endif const char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ struct list_head mnt_list; struct list_head mnt_expire; /* link in fs-specific expiry list */