proc.c (05552832204e37e038d550e1354300eb11a9e5ec) | proc.c (6b3944e42e2e554aa5a4be681ecd70dccd459114) |
---|---|
1/* /proc interface for AFS 2 * 3 * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved. 4 * Written by David Howells (dhowells@redhat.com) 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version --- 19 unchanged lines hidden (view full) --- 28} 29 30/* 31 * Display the list of cells known to the namespace. 32 */ 33static int afs_proc_cells_show(struct seq_file *m, void *v) 34{ 35 struct afs_cell *cell = list_entry(v, struct afs_cell, proc_link); | 1/* /proc interface for AFS 2 * 3 * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved. 4 * Written by David Howells (dhowells@redhat.com) 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version --- 19 unchanged lines hidden (view full) --- 28} 29 30/* 31 * Display the list of cells known to the namespace. 32 */ 33static int afs_proc_cells_show(struct seq_file *m, void *v) 34{ 35 struct afs_cell *cell = list_entry(v, struct afs_cell, proc_link); |
36 struct afs_net *net = afs_seq2net(m); | |
37 | 36 |
38 if (v == &net->proc_cells) { | 37 if (v == SEQ_START_TOKEN) { |
39 /* display header on line 1 */ 40 seq_puts(m, "USE NAME\n"); 41 return 0; 42 } 43 44 /* display one cell per line on subsequent lines */ 45 seq_printf(m, "%3u %s\n", atomic_read(&cell->usage), cell->name); 46 return 0; 47} 48 49static void *afs_proc_cells_start(struct seq_file *m, loff_t *_pos) 50 __acquires(rcu) 51{ 52 rcu_read_lock(); | 38 /* display header on line 1 */ 39 seq_puts(m, "USE NAME\n"); 40 return 0; 41 } 42 43 /* display one cell per line on subsequent lines */ 44 seq_printf(m, "%3u %s\n", atomic_read(&cell->usage), cell->name); 45 return 0; 46} 47 48static void *afs_proc_cells_start(struct seq_file *m, loff_t *_pos) 49 __acquires(rcu) 50{ 51 rcu_read_lock(); |
53 return seq_list_start_head(&afs_seq2net(m)->proc_cells, *_pos); | 52 return seq_hlist_start_head_rcu(&afs_seq2net(m)->proc_cells, *_pos); |
54} 55 56static void *afs_proc_cells_next(struct seq_file *m, void *v, loff_t *pos) 57{ | 53} 54 55static void *afs_proc_cells_next(struct seq_file *m, void *v, loff_t *pos) 56{ |
58 return seq_list_next(v, &afs_seq2net(m)->proc_cells, pos); | 57 return seq_hlist_next_rcu(v, &afs_seq2net(m)->proc_cells, pos); |
59} 60 61static void afs_proc_cells_stop(struct seq_file *m, void *v) 62 __releases(rcu) 63{ 64 rcu_read_unlock(); 65} 66 --- 580 unchanged lines hidden --- | 58} 59 60static void afs_proc_cells_stop(struct seq_file *m, void *v) 61 __releases(rcu) 62{ 63 rcu_read_unlock(); 64} 65 --- 580 unchanged lines hidden --- |