From e9ec286d9b2dbe7607cd79ff7cfe35cdeef521ae Mon Sep 17 00:00:00 2001 From: Chas Williams Date: Mon, 19 Aug 2002 22:52:52 +0000 Subject: [PATCH] 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 --- src/afs/LINUX/osi_vnodeops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 8e2264c14..14bf5fb49 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; } -- 2.39.5