diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2018-07-18 09:44:44 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-07-18 09:44:44 -0400 |
commit | 573e1784817ca1f13d76a0df636929e983e5de3c (patch) | |
tree | c9e6064b35edce3c6693ea1a1365196900bd5592 /include/linux/fsnotify.h | |
parent | de2a4a501e716bbf5ff691ba16faf59a35320228 (diff) |
Revert "fsnotify: support overlayfs"
This reverts commit f3fbbb079263bd29ae592478de6808db7e708267.
Overlayfs now works correctly without adding hacks to fsnotify.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'include/linux/fsnotify.h')
-rw-r--r-- | include/linux/fsnotify.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index bdaf22582f6e..fd1ce10553bf 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -30,11 +30,7 @@ static inline int fsnotify_parent(const struct path *path, struct dentry *dentry | |||
30 | static inline int fsnotify_perm(struct file *file, int mask) | 30 | static inline int fsnotify_perm(struct file *file, int mask) |
31 | { | 31 | { |
32 | const struct path *path = &file->f_path; | 32 | const struct path *path = &file->f_path; |
33 | /* | 33 | struct inode *inode = file_inode(file); |
34 | * Do not use file_inode() here or anywhere in this file to get the | ||
35 | * inode. That would break *notity on overlayfs. | ||
36 | */ | ||
37 | struct inode *inode = path->dentry->d_inode; | ||
38 | __u32 fsnotify_mask = 0; | 34 | __u32 fsnotify_mask = 0; |
39 | int ret; | 35 | int ret; |
40 | 36 | ||
@@ -178,7 +174,7 @@ static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry) | |||
178 | static inline void fsnotify_access(struct file *file) | 174 | static inline void fsnotify_access(struct file *file) |
179 | { | 175 | { |
180 | const struct path *path = &file->f_path; | 176 | const struct path *path = &file->f_path; |
181 | struct inode *inode = path->dentry->d_inode; | 177 | struct inode *inode = file_inode(file); |
182 | __u32 mask = FS_ACCESS; | 178 | __u32 mask = FS_ACCESS; |
183 | 179 | ||
184 | if (S_ISDIR(inode->i_mode)) | 180 | if (S_ISDIR(inode->i_mode)) |
@@ -196,7 +192,7 @@ static inline void fsnotify_access(struct file *file) | |||
196 | static inline void fsnotify_modify(struct file *file) | 192 | static inline void fsnotify_modify(struct file *file) |
197 | { | 193 | { |
198 | const struct path *path = &file->f_path; | 194 | const struct path *path = &file->f_path; |
199 | struct inode *inode = path->dentry->d_inode; | 195 | struct inode *inode = file_inode(file); |
200 | __u32 mask = FS_MODIFY; | 196 | __u32 mask = FS_MODIFY; |
201 | 197 | ||
202 | if (S_ISDIR(inode->i_mode)) | 198 | if (S_ISDIR(inode->i_mode)) |
@@ -214,7 +210,7 @@ static inline void fsnotify_modify(struct file *file) | |||
214 | static inline void fsnotify_open(struct file *file) | 210 | static inline void fsnotify_open(struct file *file) |
215 | { | 211 | { |
216 | const struct path *path = &file->f_path; | 212 | const struct path *path = &file->f_path; |
217 | struct inode *inode = path->dentry->d_inode; | 213 | struct inode *inode = file_inode(file); |
218 | __u32 mask = FS_OPEN; | 214 | __u32 mask = FS_OPEN; |
219 | 215 | ||
220 | if (S_ISDIR(inode->i_mode)) | 216 | if (S_ISDIR(inode->i_mode)) |
@@ -230,7 +226,7 @@ static inline void fsnotify_open(struct file *file) | |||
230 | static inline void fsnotify_close(struct file *file) | 226 | static inline void fsnotify_close(struct file *file) |
231 | { | 227 | { |
232 | const struct path *path = &file->f_path; | 228 | const struct path *path = &file->f_path; |
233 | struct inode *inode = path->dentry->d_inode; | 229 | struct inode *inode = file_inode(file); |
234 | fmode_t mode = file->f_mode; | 230 | fmode_t mode = file->f_mode; |
235 | __u32 mask = (mode & FMODE_WRITE) ? FS_CLOSE_WRITE : FS_CLOSE_NOWRITE; | 231 | __u32 mask = (mode & FMODE_WRITE) ? FS_CLOSE_WRITE : FS_CLOSE_NOWRITE; |
236 | 232 | ||