On Wed 04-08-21 12:05:53, Gabriel Krisman Bertazi wrote: > Split out the final bits of struct fsnotify_mark->flags for use by a > backend. > > Signed-off-by: Gabriel Krisman Bertazi <krisman@xxxxxxxxxxxxx> > --- > include/linux/fsnotify_backend.h | 19 ++++++++++++++++--- > 1 file changed, 16 insertions(+), 3 deletions(-) > > diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h > index 1ce66748a2d2..9d5586445c65 100644 > --- a/include/linux/fsnotify_backend.h > +++ b/include/linux/fsnotify_backend.h > @@ -363,6 +363,21 @@ struct fsnotify_mark_connector { > struct hlist_head list; > }; > > +#define FSNOTIFY_MARK_FLAG(flag) \ > +static const unsigned int FSNOTIFY_MARK_FLAG_##flag = \ > + (1 << FSN_MARK_FL_BIT_##flag) Static variable declaration in a header file makes me a bit uneasy. I know it is const so a compiler should optimize this to a constant but still there will likely be some side-effects (see the 0-day warning). Honestly, given these are just three flags I'd just don't overengineer this and have: #define FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY \ (1 << FSN_MARK_FL_BIT_IGNORED_SURV_MODIFY) ... Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR