client: add assert to catch dentry ref drop during unlink
Add ceph_assert(dn->ref > 0) after Dentry::unlink() in Client::unlink() to catch the case where internal put() calls drop the dentry reference to zero before we proceed to detach/lru_remove. This turns a silent use-after-free into a clean assertion failure with a full stack trace, making it possible to catch the exact conditions in a test environment. Signed-off-by: Igor Golikov <igolikov@ibm.com> Fixes: https://tracker.ceph.com/issues/74625
I
Igor Golikov committed
227b558f203e8ccedcea742591c78c0e1a8079ef
Parent: 94bf1d7
Committed by Venky Shankar <vshankar@redhat.com>
on 7/1/2026, 5:34:38 AM