From 0066ae3a5ecb169c787955a223c60d6df05b9c18 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 9 Apr 2020 14:52:40 +0200 Subject: [PATCH] ANDROID: fix up fsnotify.h merge error in previous upstream merge. Commit dd5c9369672e ("Merge 7e63420847ae ("Merge tag 'acpi-5.7-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm") into android-mainline") was not done properly, and had a half-completed merge of fsnotify.h This should fix that build issue. Thanks to YongQin Liu for the quick notice of this error. Reported-by: YongQin Liu Signed-off-by: Greg Kroah-Hartman Change-Id: I5fabf513c150cbd833215b71d89f8ff38d8b9e33 --- include/linux/fsnotify.h | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index e018872b047c..3b7ef4a7faf5 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h @@ -30,16 +30,6 @@ static inline int fsnotify_dirent(struct inode *dir, struct dentry *dentry, &dentry->d_name, 0); } -/* Notify this dentry's parent about a child's events. */ -static inline int fsnotify_parent(const struct path *path, - struct dentry *dentry, __u32 mask) -{ - if (!dentry) - dentry = path->dentry; - - return __fsnotify_parent(path, dentry, mask); -} - /* * Simple wrapper to consolidate calls fsnotify_parent()/fsnotify() when * an event is on a path. @@ -47,7 +37,7 @@ static inline int fsnotify_parent(const struct path *path, static inline int fsnotify_path(struct inode *inode, const struct path *path, __u32 mask) { - int ret = fsnotify_parent(path, NULL, mask); + int ret = fsnotify_parent(path->dentry, mask, path, FSNOTIFY_EVENT_PATH); if (ret) return ret; @@ -273,7 +263,7 @@ static inline void fsnotify_open(struct file *file) if (path->dentry->d_op && path->dentry->d_op->d_canonical_path) { path->dentry->d_op->d_canonical_path(path, &lower_path); - fsnotify_parent(&lower_path, NULL, mask); + fsnotify_parent(lower_path.dentry, mask, &lower_path, FSNOTIFY_EVENT_PATH); fsnotify(lower_path.dentry->d_inode, mask, &lower_path, FSNOTIFY_EVENT_PATH, NULL, 0); path_put(&lower_path); } @@ -308,7 +298,7 @@ static inline void fsnotify_xattr(struct dentry *dentry) if (S_ISDIR(inode->i_mode)) mask |= FS_ISDIR; - fsnotify_parent(NULL, dentry, mask); + fsnotify_parent(dentry, mask, inode, FSNOTIFY_EVENT_INODE); fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0); } @@ -343,7 +333,7 @@ static inline void fsnotify_change(struct dentry *dentry, unsigned int ia_valid) if (S_ISDIR(inode->i_mode)) mask |= FS_ISDIR; - fsnotify_parent(NULL, dentry, mask); + fsnotify_parent(dentry, mask, inode, FSNOTIFY_EVENT_INODE); fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0); } }