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 à :
@@ -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);
|
||||
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur