aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ubifs/scan.c')
-rw-r--r--fs/ubifs/scan.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ubifs/scan.c b/fs/ubifs/scan.c
index a0a305ca61af..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
@@ -218,6 +218,9 @@ int ubifs_add_snod(const struct ubifs_info *c, struct ubifs_scan_leb *sleb,
218 */ 218 */
219 key_read(c, &ino->key, &snod->key); 219 key_read(c, &ino->key, &snod->key);
220 break; 220 break;
221 default:
222 invalid_key_init(c, &snod->key);
223 break;
221 } 224 }
222 list_add_tail(&snod->list, &sleb->nodes); 225 list_add_tail(&snod->list, &sleb->nodes);
223 sleb->nodes_cnt += 1; 226 sleb->nodes_cnt += 1;