From mboxrd@z Thu Jan 1 00:00:00 1970 From: p.ittershagen@googlemail.com (Philipp Ittershagen) Date: Wed, 8 Feb 2012 14:55:28 +0100 Subject: =?UTF-8?Q?Re=3A_=E7=AD=94=E5=A4=8D=3A_parent_inode_from_the_current_struct_ino?= =?UTF-8?Q?de?= In-Reply-To: References: <9F2B2656C8747B498D56A7B30FF5EB9F01C0964B@CNMAIL13.cn.utstarcom.com> Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi Jack, On Wed, Feb 8, 2012 at 2:00 PM, Jack David 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