mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 13:38:01 +00:00
linux26-dcache-lock-20050116
FIXES 17266 "The changes I submitted previously, and committed as linux-26-vlru-cycle-20041012 do not satisfy necessary invariants of the dcache api. 1) the dcache_lock is not held when calling d_unhashed and list_empty(&dentry->d_subdirs) 2) the caller of d_prune_aliases does not hold it's own ref on the inode Patch attached.(has been used lightly for a month or so)"
This commit is contained in:
parent
091d64876b
commit
646028dbdb
@ -842,16 +842,24 @@ afs_NewVCache(struct VenusFid *afid, struct server *serverp)
|
||||
#if defined(AFS_LINUX26_ENV)
|
||||
struct dentry *dentry;
|
||||
struct list_head *cur, *head = &(AFSTOI(tvc))->i_dentry;
|
||||
AFS_FAST_HOLD(tvc);
|
||||
AFS_GUNLOCK();
|
||||
shrink_restart:
|
||||
DLOCK();
|
||||
cur=head;
|
||||
while ((cur = cur->next) != head) {
|
||||
dentry = list_entry(cur, struct dentry, d_alias);
|
||||
if (!d_unhashed(dentry) &&
|
||||
!list_empty(&dentry->d_subdirs))
|
||||
!list_empty(&dentry->d_subdirs)) {
|
||||
DUNLOCK();
|
||||
shrink_dcache_parent(dentry);
|
||||
goto shrink_restart;
|
||||
}
|
||||
}
|
||||
DUNLOCK();
|
||||
d_prune_aliases(AFSTOI(tvc));
|
||||
AFS_GLOCK();
|
||||
AFS_FAST_RELE(tvc);
|
||||
#else
|
||||
afs_TryFlushDcacheChildren(tvc);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user