Lines Matching refs:info
77 static inline int fanotify_info_dir_fh_len(struct fanotify_info *info) in fanotify_info_dir_fh_len() argument
79 if (!info->dir_fh_totlen || in fanotify_info_dir_fh_len()
80 WARN_ON_ONCE(info->dir_fh_totlen < FANOTIFY_FH_HDR_LEN)) in fanotify_info_dir_fh_len()
83 return info->dir_fh_totlen - FANOTIFY_FH_HDR_LEN; in fanotify_info_dir_fh_len()
86 static inline struct fanotify_fh *fanotify_info_dir_fh(struct fanotify_info *info) in fanotify_info_dir_fh() argument
90 return (struct fanotify_fh *)info->buf; in fanotify_info_dir_fh()
93 static inline int fanotify_info_file_fh_len(struct fanotify_info *info) in fanotify_info_file_fh_len() argument
95 if (!info->file_fh_totlen || in fanotify_info_file_fh_len()
96 WARN_ON_ONCE(info->file_fh_totlen < FANOTIFY_FH_HDR_LEN)) in fanotify_info_file_fh_len()
99 return info->file_fh_totlen - FANOTIFY_FH_HDR_LEN; in fanotify_info_file_fh_len()
102 static inline struct fanotify_fh *fanotify_info_file_fh(struct fanotify_info *info) in fanotify_info_file_fh() argument
104 return (struct fanotify_fh *)(info->buf + info->dir_fh_totlen); in fanotify_info_file_fh()
107 static inline const char *fanotify_info_name(struct fanotify_info *info) in fanotify_info_name() argument
109 return info->buf + info->dir_fh_totlen + info->file_fh_totlen; in fanotify_info_name()
112 static inline void fanotify_info_init(struct fanotify_info *info) in fanotify_info_init() argument
114 info->dir_fh_totlen = 0; in fanotify_info_init()
115 info->file_fh_totlen = 0; in fanotify_info_init()
116 info->name_len = 0; in fanotify_info_init()
119 static inline unsigned int fanotify_info_len(struct fanotify_info *info) in fanotify_info_len() argument
121 return info->dir_fh_totlen + info->file_fh_totlen + info->name_len; in fanotify_info_len()
124 static inline void fanotify_info_copy_name(struct fanotify_info *info, in fanotify_info_copy_name() argument
127 info->name_len = name->len; in fanotify_info_copy_name()
128 strcpy(info->buf + info->dir_fh_totlen + info->file_fh_totlen, in fanotify_info_copy_name()
190 struct fanotify_info info; member
215 return fanotify_info_file_fh(&FANOTIFY_NE(event)->info); in fanotify_event_object_fh()
224 return &FANOTIFY_NE(event)->info; in fanotify_event_info()
231 struct fanotify_info *info = fanotify_event_info(event); in fanotify_event_object_fh_len() local
234 if (info) in fanotify_event_object_fh_len()
235 return info->file_fh_totlen ? fh->len : 0; in fanotify_event_object_fh_len()
242 struct fanotify_info *info = fanotify_event_info(event); in fanotify_event_dir_fh_len() local
244 return info ? fanotify_info_dir_fh_len(info) : 0; in fanotify_event_dir_fh_len()