uu_start(struct seq_file *m, loff_t *pos)
{
struct unixuser *tu;
+ void *ret;
loff_t n = 0;
afs_int32 i;
- ObtainReadLock(&afs_xuser);
if (!*pos)
return (void *)(1);
+ AFS_GLOCK();
+ ObtainReadLock(&afs_xuser);
+
+ ret = NULL;
+
for (i = 0; i < NUSERS; i++) {
for (tu = afs_users[i]; tu; tu = tu->next) {
if (++n == *pos)
- return tu;
+ ret = tu;
+ goto done;
}
}
- return NULL;
+ done:
+ AFS_GUNLOCK();
+ return ret;
}
static void *
static void
uu_stop(struct seq_file *m, void *p)
{
+ AFS_GLOCK();
ReleaseReadLock(&afs_xuser);
+ AFS_GUNLOCK();
}
static int
return 0;
}
+ AFS_GLOCK();
+
tu->refCount++;
ReleaseReadLock(&afs_xuser);
afs_PutUser(tu, READ_LOCK);
ObtainReadLock(&afs_xuser);
+ AFS_GUNLOCK();
+
return 0;
}
decor */
char temp[91];
afs_uint32 addr;
+
+ AFS_GLOCK();
ObtainReadLock(&afs_xcell);
ReleaseReadLock(&afs_xcell);
done:
+ AFS_GUNLOCK();
+
*start = buffer + len - (pos - offset);
len = pos - offset;
if (len > length)