From: Chas Williams Date: Mon, 19 Aug 2002 22:52:52 +0000 (+0000) Subject: linux-dentry-revalidate-lock-kernel-20020813 X-Git-Tag: openafs-devel_1_3_3~4 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=e9ec286d9b2dbe7607cd79ff7cfe35cdeef521ae linux-dentry-revalidate-lock-kernel-20020813 avoid potential race for shrink_dcache_parent/d_drop smbfs and nfs do equivalent. ==================== This delta was composed from multiple commits as part of the CVS->Git migration. The checkin message with each commit was inconsistent. The following are the additional commit messages. ==================== avoid potential race for shrink_dcache_parent/d_drop smbfs and nfs do equivalent. slight rework to avoid holding glock in a way which could deadlock us --- diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 8e2264c..14bf5fb 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -840,6 +840,7 @@ static int afs_linux_dentry_revalidate(struct dentry *dp) struct vcache *parentvcp = ITOAFS(dp->d_parent->d_inode); AFS_GLOCK(); + lock_kernel(); sysState.allocked = 0; @@ -896,6 +897,7 @@ done: shrink_dcache_parent(dp); d_drop(dp); } + unlock_kernel(); return !bad_dentry; }