aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/namespace.c4
-rw-r--r--fs/notify/fsnotify.c4
-rw-r--r--include/linux/mount.h6
3 files changed, 10 insertions, 4 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 88058de59c7c..a2d681a6b5e9 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -29,6 +29,7 @@
29#include <linux/log2.h> 29#include <linux/log2.h>
30#include <linux/idr.h> 30#include <linux/idr.h>
31#include <linux/fs_struct.h> 31#include <linux/fs_struct.h>
32#include <linux/fsnotify.h>
32#include <asm/uaccess.h> 33#include <asm/uaccess.h>
33#include <asm/unistd.h> 34#include <asm/unistd.h>
34#include "pnode.h" 35#include "pnode.h"
@@ -150,6 +151,9 @@ struct vfsmount *alloc_vfsmnt(const char *name)
150 INIT_LIST_HEAD(&mnt->mnt_share); 151 INIT_LIST_HEAD(&mnt->mnt_share);
151 INIT_LIST_HEAD(&mnt->mnt_slave_list); 152 INIT_LIST_HEAD(&mnt->mnt_slave_list);
152 INIT_LIST_HEAD(&mnt->mnt_slave); 153 INIT_LIST_HEAD(&mnt->mnt_slave);
154#ifdef CONFIG_FSNOTIFY
155 INIT_HLIST_HEAD(&mnt->mnt_fsnotify_marks);
156#endif
153#ifdef CONFIG_SMP 157#ifdef CONFIG_SMP
154 mnt->mnt_writers = alloc_percpu(int); 158 mnt->mnt_writers = alloc_percpu(int);
155 if (!mnt->mnt_writers) 159 if (!mnt->mnt_writers)
diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c
index 60e84fd338dd..e0bf86953e1b 100644
--- a/fs/notify/fsnotify.c
+++ b/fs/notify/fsnotify.c
@@ -163,9 +163,7 @@ static bool needed_by_vfsmount(__u32 test_mask, struct vfsmount *mnt)
163 if (!mnt) 163 if (!mnt)
164 return false; 164 return false;
165 165
166 /* hook in this when mnt->mnt_fsnotify_mask is defined */ 166 return (test_mask & mnt->mnt_fsnotify_mask);
167 /* return (test_mask & path->mnt->mnt_fsnotify_mask); */
168 return false;
169} 167}
170/* 168/*
171 * This is the main call to fsnotify. The VFS calls into hook specific functions 169 * This is the main call to fsnotify. The VFS calls into hook specific functions
diff --git a/include/linux/mount.h b/include/linux/mount.h
index 4bd05474d11d..907210bd9f9c 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -56,7 +56,11 @@ struct vfsmount {
56 struct list_head mnt_mounts; /* list of children, anchored here */ 56 struct list_head mnt_mounts; /* list of children, anchored here */
57 struct list_head mnt_child; /* and going through their mnt_child */ 57 struct list_head mnt_child; /* and going through their mnt_child */
58 int mnt_flags; 58 int mnt_flags;
59 /* 4 bytes hole on 64bits arches */ 59 /* 4 bytes hole on 64bits arches without fsnotify */
60#ifdef CONFIG_FSNOTIFY
61 __u32 mnt_fsnotify_mask;
62 struct hlist_head mnt_fsnotify_marks;
63#endif
60 const char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ 64 const char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */
61 struct list_head mnt_list; 65 struct list_head mnt_list;
62 struct list_head mnt_expire; /* link in fs-specific expiry list */ 66 struct list_head mnt_expire; /* link in fs-specific expiry list */