On Wed 09-01-19 09:22:19, Amir Goldstein wrote: > > @@ -31,7 +37,9 @@ struct fanotify_event_info { > > */ > > struct fanotify_perm_event_info { > > struct fanotify_event_info fae; > > - int response; /* userspace answer to question */ > > + unsigned int response; /* userspace answer to the event. We also use > > + * high bits of this field for recording state > > + * of the event. */ > > What's wrong with: > > short response; /* userspace answer to question */ > short state; /* the state of this event */ > > Will make for a much simpler code/patch IMO. I guess you're right. I'm somewhat cautious about types shorter than int as I do read 'state' locklessly and for shorter-than-int types compiler can do fancy things like read-modify-write cycle of a full word when storing some value in either response or state. But I think this particular case should be fine. Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR