diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fsnotify.h | 20 | ||||
-rw-r--r-- | include/linux/fsnotify_backend.h | 4 |
2 files changed, 12 insertions, 12 deletions
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index 5059faacceab..ecb43b33d181 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -98,8 +98,8 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | |||
98 | old_dir_mask |= FS_DN_RENAME; | 98 | old_dir_mask |= FS_DN_RENAME; |
99 | 99 | ||
100 | if (isdir) { | 100 | if (isdir) { |
101 | old_dir_mask |= FS_IN_ISDIR; | 101 | old_dir_mask |= FS_ISDIR; |
102 | new_dir_mask |= FS_IN_ISDIR; | 102 | new_dir_mask |= FS_ISDIR; |
103 | } | 103 | } |
104 | 104 | ||
105 | fsnotify(old_dir, old_dir_mask, old_dir, FSNOTIFY_EVENT_INODE, old_name, fs_cookie); | 105 | fsnotify(old_dir, old_dir_mask, old_dir, FSNOTIFY_EVENT_INODE, old_name, fs_cookie); |
@@ -137,7 +137,7 @@ static inline void fsnotify_nameremove(struct dentry *dentry, int isdir) | |||
137 | __u32 mask = FS_DELETE; | 137 | __u32 mask = FS_DELETE; |
138 | 138 | ||
139 | if (isdir) | 139 | if (isdir) |
140 | mask |= FS_IN_ISDIR; | 140 | mask |= FS_ISDIR; |
141 | 141 | ||
142 | fsnotify_parent(NULL, dentry, mask); | 142 | fsnotify_parent(NULL, dentry, mask); |
143 | } | 143 | } |
@@ -179,7 +179,7 @@ static inline void fsnotify_link(struct inode *dir, struct inode *inode, struct | |||
179 | */ | 179 | */ |
180 | static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry) | 180 | static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry) |
181 | { | 181 | { |
182 | __u32 mask = (FS_CREATE | FS_IN_ISDIR); | 182 | __u32 mask = (FS_CREATE | FS_ISDIR); |
183 | struct inode *d_inode = dentry->d_inode; | 183 | struct inode *d_inode = dentry->d_inode; |
184 | 184 | ||
185 | audit_inode_child(dentry, inode); | 185 | audit_inode_child(dentry, inode); |
@@ -197,7 +197,7 @@ static inline void fsnotify_access(struct file *file) | |||
197 | __u32 mask = FS_ACCESS; | 197 | __u32 mask = FS_ACCESS; |
198 | 198 | ||
199 | if (S_ISDIR(inode->i_mode)) | 199 | if (S_ISDIR(inode->i_mode)) |
200 | mask |= FS_IN_ISDIR; | 200 | mask |= FS_ISDIR; |
201 | 201 | ||
202 | if (!(file->f_mode & FMODE_NONOTIFY)) { | 202 | if (!(file->f_mode & FMODE_NONOTIFY)) { |
203 | fsnotify_parent(path, NULL, mask); | 203 | fsnotify_parent(path, NULL, mask); |
@@ -215,7 +215,7 @@ static inline void fsnotify_modify(struct file *file) | |||
215 | __u32 mask = FS_MODIFY; | 215 | __u32 mask = FS_MODIFY; |
216 | 216 | ||
217 | if (S_ISDIR(inode->i_mode)) | 217 | if (S_ISDIR(inode->i_mode)) |
218 | mask |= FS_IN_ISDIR; | 218 | mask |= FS_ISDIR; |
219 | 219 | ||
220 | if (!(file->f_mode & FMODE_NONOTIFY)) { | 220 | if (!(file->f_mode & FMODE_NONOTIFY)) { |
221 | fsnotify_parent(path, NULL, mask); | 221 | fsnotify_parent(path, NULL, mask); |
@@ -233,7 +233,7 @@ static inline void fsnotify_open(struct file *file) | |||
233 | __u32 mask = FS_OPEN; | 233 | __u32 mask = FS_OPEN; |
234 | 234 | ||
235 | if (S_ISDIR(inode->i_mode)) | 235 | if (S_ISDIR(inode->i_mode)) |
236 | mask |= FS_IN_ISDIR; | 236 | mask |= FS_ISDIR; |
237 | 237 | ||
238 | if (!(file->f_mode & FMODE_NONOTIFY)) { | 238 | if (!(file->f_mode & FMODE_NONOTIFY)) { |
239 | fsnotify_parent(path, NULL, mask); | 239 | fsnotify_parent(path, NULL, mask); |
@@ -252,7 +252,7 @@ static inline void fsnotify_close(struct file *file) | |||
252 | __u32 mask = (mode & FMODE_WRITE) ? FS_CLOSE_WRITE : FS_CLOSE_NOWRITE; | 252 | __u32 mask = (mode & FMODE_WRITE) ? FS_CLOSE_WRITE : FS_CLOSE_NOWRITE; |
253 | 253 | ||
254 | if (S_ISDIR(inode->i_mode)) | 254 | if (S_ISDIR(inode->i_mode)) |
255 | mask |= FS_IN_ISDIR; | 255 | mask |= FS_ISDIR; |
256 | 256 | ||
257 | if (!(file->f_mode & FMODE_NONOTIFY)) { | 257 | if (!(file->f_mode & FMODE_NONOTIFY)) { |
258 | fsnotify_parent(path, NULL, mask); | 258 | fsnotify_parent(path, NULL, mask); |
@@ -269,7 +269,7 @@ static inline void fsnotify_xattr(struct dentry *dentry) | |||
269 | __u32 mask = FS_ATTRIB; | 269 | __u32 mask = FS_ATTRIB; |
270 | 270 | ||
271 | if (S_ISDIR(inode->i_mode)) | 271 | if (S_ISDIR(inode->i_mode)) |
272 | mask |= FS_IN_ISDIR; | 272 | mask |= FS_ISDIR; |
273 | 273 | ||
274 | fsnotify_parent(NULL, dentry, mask); | 274 | fsnotify_parent(NULL, dentry, mask); |
275 | fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0); | 275 | fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0); |
@@ -304,7 +304,7 @@ static inline void fsnotify_change(struct dentry *dentry, unsigned int ia_valid) | |||
304 | 304 | ||
305 | if (mask) { | 305 | if (mask) { |
306 | if (S_ISDIR(inode->i_mode)) | 306 | if (S_ISDIR(inode->i_mode)) |
307 | mask |= FS_IN_ISDIR; | 307 | mask |= FS_ISDIR; |
308 | 308 | ||
309 | fsnotify_parent(NULL, dentry, mask); | 309 | fsnotify_parent(NULL, dentry, mask); |
310 | fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0); | 310 | fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0); |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 4366f458a86a..b36041e9cd34 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -45,7 +45,7 @@ | |||
45 | #define FS_ACCESS_PERM 0x00020000 /* access event in a permissions hook */ | 45 | #define FS_ACCESS_PERM 0x00020000 /* access event in a permissions hook */ |
46 | 46 | ||
47 | #define FS_EXCL_UNLINK 0x04000000 /* do not send events if object is unlinked */ | 47 | #define FS_EXCL_UNLINK 0x04000000 /* do not send events if object is unlinked */ |
48 | #define FS_IN_ISDIR 0x40000000 /* event occurred against dir */ | 48 | #define FS_ISDIR 0x40000000 /* event occurred against dir */ |
49 | #define FS_IN_ONESHOT 0x80000000 /* only send event once */ | 49 | #define FS_IN_ONESHOT 0x80000000 /* only send event once */ |
50 | 50 | ||
51 | #define FS_DN_RENAME 0x10000000 /* file renamed */ | 51 | #define FS_DN_RENAME 0x10000000 /* file renamed */ |
@@ -72,7 +72,7 @@ | |||
72 | FS_DELETE | FS_DELETE_SELF | FS_MOVE_SELF | \ | 72 | FS_DELETE | FS_DELETE_SELF | FS_MOVE_SELF | \ |
73 | FS_UNMOUNT | FS_Q_OVERFLOW | FS_IN_IGNORED | \ | 73 | FS_UNMOUNT | FS_Q_OVERFLOW | FS_IN_IGNORED | \ |
74 | FS_OPEN_PERM | FS_ACCESS_PERM | FS_EXCL_UNLINK | \ | 74 | FS_OPEN_PERM | FS_ACCESS_PERM | FS_EXCL_UNLINK | \ |
75 | FS_IN_ISDIR | FS_IN_ONESHOT | FS_DN_RENAME | \ | 75 | FS_ISDIR | FS_IN_ONESHOT | FS_DN_RENAME | \ |
76 | FS_DN_MULTISHOT | FS_EVENT_ON_CHILD) | 76 | FS_DN_MULTISHOT | FS_EVENT_ON_CHILD) |
77 | 77 | ||
78 | struct fsnotify_group; | 78 | struct fsnotify_group; |