diff options
Diffstat (limited to 'fs/ubifs/scan.c')
-rw-r--r-- | fs/ubifs/scan.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/ubifs/scan.c b/fs/ubifs/scan.c index 96c525384191..3e1ee57dbeaa 100644 --- a/fs/ubifs/scan.c +++ b/fs/ubifs/scan.c | |||
@@ -197,7 +197,7 @@ int ubifs_add_snod(const struct ubifs_info *c, struct ubifs_scan_leb *sleb, | |||
197 | struct ubifs_ino_node *ino = buf; | 197 | struct ubifs_ino_node *ino = buf; |
198 | struct ubifs_scan_node *snod; | 198 | struct ubifs_scan_node *snod; |
199 | 199 | ||
200 | snod = kzalloc(sizeof(struct ubifs_scan_node), GFP_NOFS); | 200 | snod = kmalloc(sizeof(struct ubifs_scan_node), GFP_NOFS); |
201 | if (!snod) | 201 | if (!snod) |
202 | return -ENOMEM; | 202 | return -ENOMEM; |
203 | 203 | ||
@@ -212,13 +212,15 @@ int ubifs_add_snod(const struct ubifs_info *c, struct ubifs_scan_leb *sleb, | |||
212 | case UBIFS_DENT_NODE: | 212 | case UBIFS_DENT_NODE: |
213 | case UBIFS_XENT_NODE: | 213 | case UBIFS_XENT_NODE: |
214 | case UBIFS_DATA_NODE: | 214 | case UBIFS_DATA_NODE: |
215 | case UBIFS_TRUN_NODE: | ||
216 | /* | 215 | /* |
217 | * The key is in the same place in all keyed | 216 | * The key is in the same place in all keyed |
218 | * nodes. | 217 | * nodes. |
219 | */ | 218 | */ |
220 | key_read(c, &ino->key, &snod->key); | 219 | key_read(c, &ino->key, &snod->key); |
221 | break; | 220 | break; |
221 | default: | ||
222 | invalid_key_init(c, &snod->key); | ||
223 | break; | ||
222 | } | 224 | } |
223 | list_add_tail(&snod->list, &sleb->nodes); | 225 | list_add_tail(&snod->list, &sleb->nodes); |
224 | sleb->nodes_cnt += 1; | 226 | sleb->nodes_cnt += 1; |