fsnotify: pass connp and object type to fsnotify_add_mark()

Instead of passing inode and vfsmount arguments to fsnotify_add_mark()
and its _locked variant, pass an abstract object pointer and the object
type.

The helpers fsnotify_obj_{inode,mount} are added to get the concrete
object pointer from abstract object pointer.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Cette révision appartient à :
Amir Goldstein
2018-06-23 17:54:48 +03:00
révisé par Jan Kara
Parent 9b6e543450
révision b812a9f589
4 fichiers modifiés avec 52 ajouts et 39 suppressions

Voir le fichier

@@ -9,6 +9,16 @@
#include "../mount.h"
static inline struct inode *fsnotify_obj_inode(fsnotify_connp_t *connp)
{
return container_of(connp, struct inode, i_fsnotify_marks);
}
static inline struct mount *fsnotify_obj_mount(fsnotify_connp_t *connp)
{
return container_of(connp, struct mount, mnt_fsnotify_marks);
}
/* destroy all events sitting in this groups notification queue */
extern void fsnotify_flush_notify(struct fsnotify_group *group);