return container_of(conn->obj, struct super_block, s_fsnotify_marks);
}
+static inline struct super_block *fsnotify_object_sb(void *obj,
+ enum fsnotify_obj_type obj_type)
+{
+ switch (obj_type) {
+ case FSNOTIFY_OBJ_TYPE_INODE:
+ return ((struct inode *)obj)->i_sb;
+ case FSNOTIFY_OBJ_TYPE_VFSMOUNT:
+ return ((struct vfsmount *)obj)->mnt_sb;
+ case FSNOTIFY_OBJ_TYPE_SB:
+ return (struct super_block *)obj;
+ default:
+ return NULL;
+ }
+}
+
static inline struct super_block *fsnotify_connector_sb(
struct fsnotify_mark_connector *conn)
{
refcount_inc(&mark->refcnt);
}
+static fsnotify_connp_t *fsnotify_object_connp(void *obj,
+ enum fsnotify_obj_type obj_type)
+{
+ switch (obj_type) {
+ case FSNOTIFY_OBJ_TYPE_INODE:
+ return &((struct inode *)obj)->i_fsnotify_marks;
+ case FSNOTIFY_OBJ_TYPE_VFSMOUNT:
+ return &real_mount(obj)->mnt_fsnotify_marks;
+ case FSNOTIFY_OBJ_TYPE_SB:
+ return &((struct super_block *)obj)->s_fsnotify_marks;
+ default:
+ return NULL;
+ }
+}
+
static __u32 *fsnotify_conn_mask_p(struct fsnotify_mark_connector *conn)
{
if (conn->type == FSNOTIFY_OBJ_TYPE_INODE)