LINUX: Avoid re-taking global lock in afs_dentry_iput 48/13748/3
authorYadavendra Yadav <yadayada@in.ibm.com>
Fri, 26 Jul 2019 14:29:25 +0000 (19:29 +0530)
committerStephan Wiesand <stephan.wiesand@desy.de>
Sun, 26 Jan 2020 20:22:40 +0000 (15:22 -0500)
commit7ddb6b599426e2f59787ce924c9a5d1801ca0ba7
tree9ddee78436c757d5593dc03361acce756e24fb97
parent62ec1c913134f515802140e48e6386ec35559767
LINUX: Avoid re-taking global lock in afs_dentry_iput

“dput” function internally can call dentry_iput which  results in
calling afs_dentry_iput. So in case before calling “dput” if global lock
was held then when afs_dentry_iput is called it will again try to lock
global lock and will result in deadlock scenario.  So to avoid this
deadlock make sure if global lock is already taken before calling
afs_dentry_iput, don’t try to lock it again.  This issue was partially
fixed in commit 0dac4de8 (Linux: drop GLOCK before calling dput)

Reviewed-on: https://gerrit.openafs.org/13725
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 5792e0211be275cf79d10e8c5f6ab2a14493e07a)

Change-Id: I4a17700adb18956fc61462663fdb690b267cc928
Reviewed-on: https://gerrit.openafs.org/13748
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/LINUX/osi_vnodeops.c