Use dget_parent to handle getting inode of parent
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Sun, 22 Nov 2009 23:31:00 +0000 (23:31 +0000)
committerDerrick Brashear <shadow|account-1000005@unknown>
Tue, 12 Jan 2010 18:44:21 +0000 (10:44 -0800)
commit987f3bf9c7420bb555eccde3b7407080a760b641
tree176ac2fa64acce4cf33211962423ee02b50dd5fc
parent90f91f4464f5785290040436b2d8cbe4b8ed5810
Use dget_parent to handle getting inode of parent

We can't safely do dp->d_parent->d_inode to access the parent inode
of a given dentry. Instead, use dget_parent() to get safely get a
reference on the parent dcache, and access the inode using that
reference. Dispose of this reference with dput() as appropriate.

Change-Id: Ic4f2159f68f95744bca08ebc99ecd5f45dc46966
Reviewed-on: http://gerrit.openafs.org/1075
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/afs/LINUX/osi_vnodeops.c