fsnotify: simplify arguments passing to fsnotify_parent()

Instead of passing both dentry and path and having to figure out which
one to use, pass data/data_type to simplify the code.

Link: https://lore.kernel.org/r/20200319151022.31456-6-amir73il@gmail.com
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
Amir Goldstein 2020-03-19 17:10:13 +02:00 committed by Jan Kara
parent aa93bdc550
commit 017de65fe5
3 changed files with 14 additions and 29 deletions

View file

@ -376,9 +376,10 @@ struct fsnotify_mark {
/* called from the vfs helpers */
/* main fsnotify call to send events */
extern int fsnotify(struct inode *to_tell, __u32 mask, const void *data, int data_is,
const struct qstr *name, u32 cookie);
extern int __fsnotify_parent(const struct path *path, struct dentry *dentry, __u32 mask);
extern int fsnotify(struct inode *to_tell, __u32 mask, const void *data,
int data_type, const struct qstr *name, u32 cookie);
extern int fsnotify_parent(struct dentry *dentry, __u32 mask, const void *data,
int data_type);
extern void __fsnotify_inode_delete(struct inode *inode);
extern void __fsnotify_vfsmount_delete(struct vfsmount *mnt);
extern void fsnotify_sb_delete(struct super_block *sb);
@ -533,13 +534,14 @@ static inline void fsnotify_init_event(struct fsnotify_event *event,
#else
static inline int fsnotify(struct inode *to_tell, __u32 mask, const void *data, int data_is,
const struct qstr *name, u32 cookie)
static inline int fsnotify(struct inode *to_tell, __u32 mask, const void *data,
int data_type, const struct qstr *name, u32 cookie)
{
return 0;
}
static inline int __fsnotify_parent(const struct path *path, struct dentry *dentry, __u32 mask)
static inline int fsnotify_parent(struct dentry *dentry, __u32 mask,
const void *data, int data_type)
{
return 0;
}