diff options
Diffstat (limited to 'fs/ubifs')
-rw-r--r-- | fs/ubifs/gc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ubifs/gc.c b/fs/ubifs/gc.c index dafef3d195d3..4fc31ca0e3b1 100644 --- a/fs/ubifs/gc.c +++ b/fs/ubifs/gc.c | |||
@@ -125,6 +125,9 @@ int data_nodes_cmp(void *priv, struct list_head *a, struct list_head *b) | |||
125 | struct ubifs_scan_node *sa, *sb; | 125 | struct ubifs_scan_node *sa, *sb; |
126 | 126 | ||
127 | cond_resched(); | 127 | cond_resched(); |
128 | if (a == b) | ||
129 | return 0; | ||
130 | |||
128 | sa = list_entry(a, struct ubifs_scan_node, list); | 131 | sa = list_entry(a, struct ubifs_scan_node, list); |
129 | sb = list_entry(b, struct ubifs_scan_node, list); | 132 | sb = list_entry(b, struct ubifs_scan_node, list); |
130 | 133 | ||
@@ -165,6 +168,9 @@ int nondata_nodes_cmp(void *priv, struct list_head *a, struct list_head *b) | |||
165 | struct ubifs_scan_node *sa, *sb; | 168 | struct ubifs_scan_node *sa, *sb; |
166 | 169 | ||
167 | cond_resched(); | 170 | cond_resched(); |
171 | if (a == b) | ||
172 | return 0; | ||
173 | |||
168 | sa = list_entry(a, struct ubifs_scan_node, list); | 174 | sa = list_entry(a, struct ubifs_scan_node, list); |
169 | sb = list_entry(b, struct ubifs_scan_node, list); | 175 | sb = list_entry(b, struct ubifs_scan_node, list); |
170 | 176 | ||