On Thu, Nov 16, 2023 at 07:50:03AM -0500, Jeff Layton wrote: > > Am I missing something subtle here? Looks like that dget() is never > > reached... > > No, I think you're correct. That looks like dead code to me too. > Probably we can just remove that "if (!dir)" condition altogether. > > Did you want to send a patch, or would you rather Xiubo or I do it? Up to you... AFAICS, it had been dead code since ca6c8ae0f793 "ceph: pass parent inode info to ceph_encode_dentry_release if we have it". In other words, that "if we have it" had already been true at that point. Prior to that commit dget() in there had been unconditional (and really a deadlock fodder); making it conditional had made it actually unreachable and that fixed the actual bug.