Re: [PATCH v2] ceph: fix deadlock bugs by making iput() calls asynchronous
From: Max Kellermann
Date: Wed Sep 17 2025 - 15:26:39 EST
On Wed, Sep 17, 2025 at 9:20 PM Viacheslav Dubeyko
<Slava.Dubeyko@xxxxxxx> wrote:
> > > > + WARN_ON_ONCE(!queue_work(ceph_inode_to_fs_client(inode)->inode_wq,
> > > > + &ceph_inode(inode)->i_work));
> > >
> > > This function looks like ceph_queue_inode_work() [1]. Can we use
> > > ceph_queue_inode_work()?
> >
> > No, we can not, because that function adds an inode reference (instead
> > of donating the existing reference) and there's no way we can safely
> > get rid of it (even if we would accept paying the overhead of two
> > extra atomic operations).
>
> This function can call iput() too. Should we rework it, then? Also, as a result,
> we will have two similar functions. And it could be confusing.
No. NOT calling iput() is the whole point of my patch. Did you read
the patch description?