X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Fafs%2FLINUX%2Fosi_proc.c;h=cf5497c3ae1b787a007304bb11cc06c0eeef45f8;hp=75ee013bf0310b12245f9c65eb98898b9cf496d4;hb=6308037dec22d5a141fc64a11472b1a36585deb2;hpb=5102d56f080f1284eecb94dbc7c06cb966c27f5b diff --git a/src/afs/LINUX/osi_proc.c b/src/afs/LINUX/osi_proc.c index 75ee013..cf5497c 100644 --- a/src/afs/LINUX/osi_proc.c +++ b/src/afs/LINUX/osi_proc.c @@ -46,6 +46,7 @@ static void *c_start(struct seq_file *m, loff_t *pos) struct afs_q *cq, *tq; loff_t n = 0; + AFS_GLOCK(); ObtainReadLock(&afs_xcell); for (cq = CellLRU.next; cq != &CellLRU; cq = tq) { tq = QNext(cq); @@ -54,8 +55,9 @@ static void *c_start(struct seq_file *m, loff_t *pos) break; } if (cq == &CellLRU) - return NULL; + cq = NULL; + AFS_GUNLOCK(); return cq; } @@ -63,18 +65,22 @@ static void *c_next(struct seq_file *m, void *p, loff_t *pos) { struct afs_q *cq = p, *tq; + AFS_GLOCK(); (*pos)++; tq = QNext(cq); if (tq == &CellLRU) return NULL; + AFS_GUNLOCK(); return tq; } static void c_stop(struct seq_file *m, void *p) { + AFS_GLOCK(); ReleaseReadLock(&afs_xcell); + AFS_GUNLOCK(); } static int c_show(struct seq_file *m, void *p)