Re: [deadlock or dead code] ceph_encode_dentry_release() misuse of dget()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux