On Sun, Mar 17, 2024 at 08:41:46PM +0200, Amir Goldstein wrote: > In preparation to passing an object pointer to add/remove/find mark > helpers, create helpers to get sb and connp by object type. > > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> > --- > fs/notify/fsnotify.h | 14 ++++++++++++++ > fs/notify/mark.c | 14 ++++++++++++++ > 2 files changed, 28 insertions(+) > > diff --git a/fs/notify/fsnotify.h b/fs/notify/fsnotify.h > index fde74eb333cc..87456ce40364 100644 > --- a/fs/notify/fsnotify.h > +++ b/fs/notify/fsnotify.h > @@ -27,6 +27,20 @@ static inline struct super_block *fsnotify_conn_sb( > return container_of(conn->obj, struct super_block, s_fsnotify_marks); > } > > +static inline struct super_block *fsnotify_object_sb(void *obj, int obj_type) If I read correctly, then in some places you use unsigned int obj_type and here you use int obj_type. The best option would likely be to just introduce an enum fsnotify_obj_type either in this series or in a follow-up series.