104 return (l < 0);
105}
106
107static inline void *vcc_walk(struct vcc_state *state, loff_t l)
108{
109 return __vcc_walk(&state->sk, state->family, &state->bucket, l) ?
110 state : NULL;
111}
112
113static int __vcc_seq_open(struct inode *inode, struct file *file,
114 int family, const struct seq_operations *ops)
115{
116 struct vcc_state *state;
117
118 state = __seq_open_private(file, ops, sizeof(*state));
119 if (state == NULL)
120 return -ENOMEM;
121
122 state->family = family;
123 return 0;
124}
125
126static void *vcc_seq_start(struct seq_file *seq, loff_t *pos)
127 __acquires(vcc_sklist_lock)
128{
129 struct vcc_state *state = seq->private;
130 loff_t left = *pos;
131
132 read_lock(&vcc_sklist_lock);
133 state->sk = SEQ_START_TOKEN;
134 return left ? vcc_walk(state, left) : SEQ_START_TOKEN;
135}
136
137static void vcc_seq_stop(struct seq_file *seq, void *v)
138 __releases(vcc_sklist_lock)
139{
140 read_unlock(&vcc_sklist_lock);
141}
142
143static void *vcc_seq_next(struct seq_file *seq, void *v, loff_t *pos)
144{