]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - fs/jffs2/jffs2_1pass.c
jffs2: cache data_crc results
[karo-tx-uboot.git] / fs / jffs2 / jffs2_1pass.c
index 4e49a056694ec6b14a71eaadd0713e5ce3a0021b..be7c1a190b51a1c9aba5001886158fafae74df39 100644 (file)
@@ -765,7 +765,10 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 inode, char *dest)
                                        put_fl_mem(jNode, pL->readbuf);
                                        continue;
                                }
-                               if (!data_crc(jNode)) {
+                               if (b->datacrc == CRC_UNKNOWN)
+                                       b->datacrc = data_crc(jNode) ?
+                                               CRC_OK : CRC_BAD;
+                               if (b->datacrc == CRC_BAD) {
                                        put_fl_mem(jNode, pL->readbuf);
                                        continue;
                                }