On Mon, Feb 09, 2026 at 04:38:00PM -0800, T.J. Mercier wrote:
...
> static void __kernfs_remove(struct kernfs_node *kn)
> {
> struct kernfs_node *pos, *parent;
> @@ -1520,6 +1538,9 @@ static void __kernfs_remove(struct kernfs_node *kn)
> struct kernfs_iattrs *ps_iattr =
> parent ? parent->iattr : NULL;
>
> + if (kernfs_type(kn) == KERNFS_FILE)
kernfs_type(pos)?
> + kernfs_notify_file_deleted(pos);
> +
...
> -static void kernfs_notify_workfn(struct work_struct *work)
> +static int fsnotify_self_event(int event)
> +{
> + if (event == FS_DELETE)
> + return FS_DELETE_SELF;
> +
> + return event;
> +}
> +
> +void kernfs_notify_workfn(struct work_struct *work)
> {
> struct kernfs_node *kn;
> struct kernfs_super_info *info;
> struct kernfs_root *root;
> u32 notify_event;
> + u32 self_event;
> repeat:
> /* pop one off the notify_list */
> spin_lock_irq(&kernfs_notify_lock);
> @@ -929,6 +938,8 @@ static void kernfs_notify_workfn(struct work_struct *work)
> kn->attr.notify_event = 0;
> spin_unlock_irq(&kernfs_notify_lock);
>
> + self_event = fsnotify_self_event(notify_event);
Maybe just inline the conversion?
Thanks.
--
tejun