If a destination is not provided, jffs2_1pass_read_inode() only
returns the length of the file. In this case, avoid reading all
the data nodes, and return as soon as the length of the file is
known.
Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
}
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) {