diff options
Diffstat (limited to 'fs/configfs/dir.c')
-rw-r--r-- | fs/configfs/dir.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c index 5f952187fc53..207f8006fd6c 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c | |||
@@ -1009,8 +1009,7 @@ static int configfs_readdir(struct file * filp, void * dirent, filldir_t filldir | |||
1009 | /* fallthrough */ | 1009 | /* fallthrough */ |
1010 | default: | 1010 | default: |
1011 | if (filp->f_pos == 2) { | 1011 | if (filp->f_pos == 2) { |
1012 | list_del(q); | 1012 | list_move(q, &parent_sd->s_children); |
1013 | list_add(q, &parent_sd->s_children); | ||
1014 | } | 1013 | } |
1015 | for (p=q->next; p!= &parent_sd->s_children; p=p->next) { | 1014 | for (p=q->next; p!= &parent_sd->s_children; p=p->next) { |
1016 | struct configfs_dirent *next; | 1015 | struct configfs_dirent *next; |
@@ -1033,8 +1032,7 @@ static int configfs_readdir(struct file * filp, void * dirent, filldir_t filldir | |||
1033 | dt_type(next)) < 0) | 1032 | dt_type(next)) < 0) |
1034 | return 0; | 1033 | return 0; |
1035 | 1034 | ||
1036 | list_del(q); | 1035 | list_move(q, p); |
1037 | list_add(q, p); | ||
1038 | p = q; | 1036 | p = q; |
1039 | filp->f_pos++; | 1037 | filp->f_pos++; |
1040 | } | 1038 | } |