mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
keyring-gcpags-20060927
FIXES 40659 do gcpags for keyrings without needing tasklist_lock
This commit is contained in:
parent
2201fd6d9f
commit
6a2ac1e2d4
@ -554,12 +554,26 @@ static int afs_pag_match(const struct key *key, const void *description)
|
||||
return strcmp(key->description, description) == 0;
|
||||
}
|
||||
|
||||
static void afs_pag_destroy(struct key *key)
|
||||
{
|
||||
afs_uint32 pag = key->payload.value;
|
||||
struct unixuser *pu;
|
||||
|
||||
pu = afs_FindUser(pag, -1, READ_LOCK);
|
||||
if (pu) {
|
||||
pu->ct.EndTimestamp = 0;
|
||||
pu->tokenTime = 0;
|
||||
afs_PutUser(pu, READ_LOCK);
|
||||
}
|
||||
}
|
||||
|
||||
struct key_type key_type_afs_pag =
|
||||
{
|
||||
.name = "afs_pag",
|
||||
.describe = afs_pag_describe,
|
||||
.instantiate = afs_pag_instantiate,
|
||||
.match = afs_pag_match,
|
||||
.destroy = afs_pag_destroy,
|
||||
};
|
||||
|
||||
void osi_keyring_init(void)
|
||||
|
@ -226,11 +226,13 @@ afs_osi_TraverseProcTable(void)
|
||||
#endif
|
||||
|
||||
#if defined(AFS_LINUX22_ENV)
|
||||
extern rwlock_t tasklist_lock __attribute__((weak));
|
||||
void
|
||||
afs_osi_TraverseProcTable()
|
||||
{
|
||||
#if !defined(LINUX_KEYRING_SUPPORT)
|
||||
extern rwlock_t tasklist_lock __attribute__((weak));
|
||||
struct task_struct *p;
|
||||
|
||||
if (&tasklist_lock)
|
||||
read_lock(&tasklist_lock);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
|
||||
@ -267,6 +269,7 @@ afs_osi_TraverseProcTable()
|
||||
else
|
||||
rcu_read_unlock();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user