Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / fs / sysfs / dir.c
index 61c4243..610b5bd 100644 (file)
@@ -430,9 +430,10 @@ static int sysfs_readdir(struct file * filp, void * dirent, filldir_t filldir)
                        i++;
                        /* fallthrough */
                default:
-                       if (filp->f_pos == 2)
-                               list_move(q, &parent_sd->s_children);
-
+                       if (filp->f_pos == 2) {
+                               list_del(q);
+                               list_add(q, &parent_sd->s_children);
+                       }
                        for (p=q->next; p!= &parent_sd->s_children; p=p->next) {
                                struct sysfs_dirent *next;
                                const char * name;
@@ -454,7 +455,8 @@ static int sysfs_readdir(struct file * filp, void * dirent, filldir_t filldir)
                                                 dt_type(next)) < 0)
                                        return 0;
 
-                               list_move(q, p);
+                               list_del(q);
+                               list_add(q, p);
                                p = q;
                                filp->f_pos++;
                        }