JFFS2: Return early when file read not necessary
authorMark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
Wed, 1 Jul 2015 04:38:22 +0000 (16:38 +1200)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 06:24:12 +0000 (08:24 +0200)
commit63b29147935e3605fa71e2d80e20fafc475f96ca
treed0f1fa307c0eebb9aca1de6b1274a090f6177b39
parent467b02380ad434ba5fd6a5eb03323b24f5d195c5
JFFS2: Return early when file read not necessary

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>
fs/jffs2/jffs2_1pass.c