From: p.ittershagen@googlemail.com (Philipp Ittershagen)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Re: 答复: parent inode from the current struct inode
Date: Wed, 8 Feb 2012 14:55:28 +0100 [thread overview]
Message-ID: <CAC157GCha591_mBpW0aC9LW=+6797=dAWzbcVZkbL2-VdympBQ@mail.gmail.com> (raw)
In-Reply-To: <CAJbRZyXd3=V2ZaDGKQ0UYpU8mvX0ArPHBUT+9sp6Uy8vgB+TFA@mail.gmail.com>
Hi Jack,
On Wed, Feb 8, 2012 at 2:00 PM, Jack David <jd6589@gmail.com> wrote:
> Okay, I tried container_of, but it did not work. So I tried
> d_obtain_alias() which worked.
>
> But I am not sure if I ?have to make a call to dput() as well in order
> to free the dentry obtained.
> Anyone can confirm this?
since d_obtain_alias() calls dput when something goes wrong after
allocating the dentry, I'm assuming that you also have to call dput to
free the dentry.
Philipp
prev parent reply other threads:[~2012-02-08 13:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-08 7:48 parent inode from the current struct inode Jack David
2012-02-08 8:39 ` Philipp Ittershagen
[not found] ` <9F2B2656C8747B498D56A7B30FF5EB9F01C0964B@CNMAIL13.cn.utstarcom.com>
2012-02-08 13:00 ` 答复: " Jack David
2012-02-08 13:55 ` Philipp Ittershagen [this message]
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='CAC157GCha591_mBpW0aC9LW=+6797=dAWzbcVZkbL2-VdympBQ@mail.gmail.com' \
--to=p.ittershagen@googlemail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).