mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +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. Change-Id: I8966aea7336b39b4c3ec265a53d820fc6135eeaf 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>
This commit is contained in:
parent
777e03103f
commit
0dac4de8ee
@ -1239,7 +1239,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…
Reference in New Issue
Block a user