From: Chas Williams Date: Fri, 19 Aug 2005 16:33:28 +0000 (+0000) Subject: STABLE14-rmdir-dont-hold-kernel-lock-20050819 X-Git-Tag: openafs-stable-1_4_0-rc1~5 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=002305be3afe280f45e923f2e7b915fcd7d9225b;p=packages%2Fo%2Fopenafs.git STABLE14-rmdir-dont-hold-kernel-lock-20050819 potentially fix one of the deadlocks people have been seeing (cherry picked from commit 49802c76b1a4cc1fb67e704e449325899ae42f0e) --- diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index fc5e8fa3b..a9df3ab91 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -1098,9 +1098,8 @@ afs_linux_rmdir(struct inode *dip, struct dentry *dp) cred_t *credp = crref(); const char *name = dp->d_name.name; -#if defined(AFS_LINUX26_ENV) - lock_kernel(); -#endif + /* locking kernel conflicts with glock? */ + AFS_GLOCK(); code = afs_rmdir(VTOAFS(dip), name, credp); AFS_GUNLOCK(); @@ -1117,9 +1116,6 @@ afs_linux_rmdir(struct inode *dip, struct dentry *dp) d_drop(dp); } -#if defined(AFS_LINUX26_ENV) - unlock_kernel(); -#endif crfree(credp); return -code; }