Re: [PATCH v1 03/12] fsnotify: don't hold a spin_lock across fsnotify_recalc_mask() calls.

Miklos Szeredi <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.kernel.autofs,gmane.comp.file-systems.ceph.devel,gmane.comp.file-systems.coda.general,gmane.linux.file-systems,gmane.linux.nfs
Message-ID <CAJfpegs-k3skRGiwZvQLzD7OrAK4KL8zwmpmJKyjRHSQ-rqX+Q@mail.gmail.com>
On Mon, 3 Aug 2026 at 03:39, NeilBrown <[email protected]> wrote:

> @@ -116,11 +117,15 @@ static int dnotify_handle_event(struct fsnotify_mark *inode_mark, u32 mask,
>                 else {
>                         *prev = dn->dn_next;
>                         kmem_cache_free(dnotify_struct_cache, dn);
> -                       dnotify_recalc_inode_mask(inode_mark);
> +                       need_recalc = true;
>                 }
>         }
>
> +       if (need_recalc)
> +               need_recalc = dnotify_recalc_inode_mask(inode_mark);
>         spin_unlock(&inode_mark->lock);
> +       if (need_recalc)
> +               fsnotify_recalc_mask(inode_mark->connector);

Is the fsnotify_group_lock() held in this case?   I don't see it.

Thanks,
Miklos
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.