]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - fs/jffs2/jffs2_1pass.c
JFFS2: Return early when file read not necessary
[karo-tx-uboot.git] / fs / jffs2 / jffs2_1pass.c
index b1d647021928897855166f34c421f5aac680c491..2e569ff59bb30a1d2b0594ba09a5e9d09c1979e4 100644 (file)
@@ -719,6 +719,12 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 inode, char *dest)
                }
                put_fl_mem(jNode, pL->readbuf);
        }
+       /*
+        * If no destination is provided, we are done.
+        * Just return the total size.
+        */
+       if (!dest)
+               return totalSize;
 #endif
 
        for (b = pL->frag.listHead; b != NULL; b = b->next) {