From: Al Viro <viro@zeniv.linux.org.uk>
To: Jeff Layton <jlayton@kernel.org>
Cc: Xiubo Li <xiubli@redhat.com>,
linux-fsdevel@vger.kernel.org, ceph-devel@vger.kernel.org
Subject: Re: [deadlock or dead code] ceph_encode_dentry_release() misuse of dget()
Date: Thu, 16 Nov 2023 16:28:14 +0000 [thread overview]
Message-ID: <20231116162814.GA1957730@ZenIV> (raw)
In-Reply-To: <44265305e099888191aa7482743f0fa7900e8336.camel@kernel.org>
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.
next prev parent reply other threads:[~2023-11-16 16:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-16 8:19 [deadlock or dead code] ceph_encode_dentry_release() misuse of dget() Al Viro
2023-11-16 12:50 ` Jeff Layton
2023-11-16 16:28 ` Al Viro [this message]
2023-11-16 16:50 ` Jeff Layton
2023-11-17 0:15 ` Xiubo Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231116162814.GA1957730@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=ceph-devel@vger.kernel.org \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=xiubli@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.