On Wed, Sep 17, 2025 at 3:59 PM Max Kellermann max.kellermann@ionos.com wrote:
+/**
- Queue an asynchronous iput() call in a worker thread. Use this
- instead of iput() in contexts where evicting the inode is unsafe.
- For example, inode eviction may cause deadlocks in
- inode_wait_for_writeback() (when called from within writeback) or
- in netfs_wait_for_outstanding_io() (when called from within the
- Ceph messenger).
- */
+void ceph_iput_async(struct inode *inode) +{
if (unlikely(!inode))
return;
if (likely(atomic_add_unless(&inode->i_count, -1, 1)))
/* somebody else is holding another reference -
* nothing left to do for us
*/
return;
LGTM, I see the queue thing ends up issuing iput() so it's all good, thanks.
No idea about the other stuff it is doing concerning ceph flags so no comment.
doutc(ceph_inode_to_fs_client(inode)->client, "%p %llx.%llx\n", inode, ceph_vinop(inode));
/* simply queue a ceph_inode_work() (donating the remaining
* reference) without setting i_work_mask bit; other than
* putting the reference, there is nothing to do
*/
WARN_ON_ONCE(!queue_work(ceph_inode_to_fs_client(inode)->inode_wq,
&ceph_inode(inode)->i_work));
/* note: queue_work() cannot fail; it i_work were already
* queued, then it would be holding another reference, but no
* such reference exists
*/
+}