Messages in this thread | | | Date | Sat, 23 Mar 2002 23:11:11 -0500 (EST) | From | Alexander Viro <> | Subject | Re: [patch 2.5] seq_file for /proc/partitions |
| |
On Sat, 23 Mar 2002 rddunlap@osdl.org wrote:
> +static void *part_next(struct seq_file *part, void *v, loff_t *pos) > +{ > + ++*pos; > + return part_start(part, pos);
Erm... Actually that _is_ wrong - what you want is
return ((struct gendisk)v)->next;
> +}
Reasons: a) just how many times do you want to grab that lock? b) why bother scanning the list from the very beginning each time?
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |