lkml.org 
[lkml]   [2002]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 2.5] seq_file for /proc/partitions
On Sat, 23 Mar 2002, Alexander Viro wrote:

|
|
| 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;

Yes, I see. Thanks.

| > +}
|
| 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?
Right again.

Will repost patch after testing.

--
~Randy

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:25    [W:0.048 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site