mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 21:47:45 +00:00
Linux: drop GLOCK before calling dput
Holding the GLOCK when calling dput can result in a deadlock when the kernel calls back into afs_dentry_iput. It should be safe to drop the lock here. Reviewed-on: http://gerrit.openafs.org/8046 Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com> Reviewed-by: Derrick Brashear <shadow@your-file-system.com> Tested-by: Derrick Brashear <shadow@your-file-system.com> (cherry picked from commit 0dac4de8eee84a43ef06c56dfc867c2a1b9a9f0c) Change-Id: Ide1dfc73ebc5fa207c19be1c16db9910cf66bea3 Reviewed-on: http://gerrit.openafs.org/8561 Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> Tested-by: Stephan Wiesand <stephan.wiesand@desy.de> Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
This commit is contained in:
parent
bbc6ee9058
commit
058c412040
@ -1218,7 +1218,13 @@ afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow)
|
||||
#endif /* AFS_NEED_CLIENTCONTEXT */
|
||||
if (vp) {
|
||||
#ifdef AFS_LINUX22_ENV
|
||||
/*
|
||||
* Holding the global lock when calling dput can cause a deadlock
|
||||
* when the kernel calls back into afs_dentry_iput
|
||||
*/
|
||||
AFS_GUNLOCK();
|
||||
dput(dp);
|
||||
AFS_GLOCK();
|
||||
#else
|
||||
#if defined(AFS_FBSD80_ENV)
|
||||
if (VOP_ISLOCKED(vp))
|
||||
|
Loading…
x
Reference in New Issue
Block a user