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 11/17/23 00:50, Jeff Layton wrote:
On Thu, 2023-11-16 at 16:28 +0000, Al Viro wrote:
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.
That makes sense.

Xiubo, would you mind spinning up a patch for this? You're probably in
the best position to make sure it gets tested these days.

Hi Jeff, Al

Sure, I will fix this. Thanks very much.

- Xiubo


Thanks!





[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